Playground and text evaluation printing result default.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Playground and text evaluation printing result default.

Nicolai Hess-3-2


2016-06-08 19:45 GMT+02:00 stepharo <[hidden email]>:

Hi nicolai

Indeed we need on way to define "menuItem action"

I do not know if it should be bound to shortcut but it should have a shortcut.

I saw that Glamour has one way, the core other ways and probably Spec a third one.

So this is really confusing.

With guille we discussed a while ago about a hierarchy of command

    id

    description

    flyhelp

    action

    shortcut.

So probably the shortcut should be virtual so that we can bind the one we want system wide.

+1 yes , something like that

I would love to have Ctrle Ctrla.... ")

stef

Le 8/6/16 à 19:35, Nicolai Hess a écrit :


2016-06-08 19:11 GMT+02:00 Tudor Girba <[hidden email]>:
Yes, we already agreed on that both for the debugger and for Spotter. We just did not get the chance to do it yet.

Hey Doru,

about your report
https://pharo.fogbugz.com/f/cases/18455 Spotter shortcuts should be externalized as settings

Please don't do this just for spotter. We really need a general solution for all tools shortcuts.

I am alread about to clean up the shortcut definitions. In the tools and the PharoShortcuts class.
But we still need a way to really define this in a customizable way.

I already wrote about this and asked (ML or fogbugz, I don't remember).
The current shortcut definitions (with pragmas for example). Can be browsed and in the Keymap browser (that is good), but they can not be changed of course, they are defined in the source.

And, the current keymap definitions (KMKEyCombination) need a way to be able to read and write as a setting, that currently does not work (as I wrote).

My proposition was, to define some kind of "Named-Keyaction" or "Named-Action", for example

CopySelectionAction (name = CopySelection,  shortcut Ctrl+C), it would act as a KMKeyCombination, but its own shortcut (Ctrl+C) would be configurable.

Now, in PharoShortcuts instead of

PharoShortcuts >>#copySelectionShortcut

    ^ $c meta

we define

PharoShortcuts >>#copySelectionShortcut

    ^ CopySelectionAction withShortcut: $c meta

(maybe on unique Instance of CopySelectionAction, or one per category)

And the keymap browser, or the settings browser could list these actions and provide a way to reset the
keycombination:

CopySelectionAction  -   | type some keycombination here |


The current way with the PharoShortcuts class and how the keys are binded to the tools don't really work for customizable shortcut definitions (or keymaps) or

I just don't see it.


nicolai


 

Doru


> On Jun 8, 2016, at 11:33 AM, Esteban Lorenzano <[hidden email]> wrote:
>
>
>> On 08 Jun 2016, at 09:04, stepharo <[hidden email][hidden email]> wrote:
>>
>>  the fact that I cannot access Spotter without hurting my hand it is also probably why I do not try more.
>
> yeah, shortcut has to be configurable, for people with big hands :)
>
>

--
www.tudorgirba.com
www.feenk.com

"Every now and then stop and ask yourself if the war you're fighting is the right one."








Reply | Threaded
Open this post in threaded view
|

Re: Playground and text evaluation printing result default.

Tudor Girba-2
In reply to this post by stepharo
Hi,

> On Jun 8, 2016, at 9:12 AM, stepharo <[hidden email]> wrote:
>
> Le 8/6/16 à 09:04, stepharo a écrit :
>
>> This is incorrect. If you would not complain aggressively, we would simply have a smoother conversation about solutions.
> My final point:
>
>    Aggressivity is often the result of not being heard.

This is a choice.

> So now you can argue that you listen :)
> But I decided that I will not bother people about such little problems anymore.
> If people believe that I'm trolling then it is the time to do something else for me.

Not once did you get a reply on this mailing list saying that a problem that was raised was bothering us. And you certainly will never get it from me. You always got a reply related to the content, and often the discussion led to new things.

We need these discussions.

Doru

> And this is what I will do.



> Stef
>

--
www.tudorgirba.com
www.feenk.com

"Reasonable is what we are accustomed with."


Reply | Threaded
Open this post in threaded view
|

shortcut settings (was: Re: Playground and text evaluation printing result default.)

Tudor Girba-2
In reply to this post by Nicolai Hess-3-2
Hi,


> On Jun 8, 2016, at 7:35 PM, Nicolai Hess <[hidden email]> wrote:
>
>
>
> 2016-06-08 19:11 GMT+02:00 Tudor Girba <[hidden email]>:
> Yes, we already agreed on that both for the debugger and for Spotter. We just did not get the chance to do it yet.
>
> Hey Doru,
>
> about your report
> https://pharo.fogbugz.com/f/cases/18455 Spotter shortcuts should be externalized as settings
>
> Please don't do this just for spotter. We really need a general solution for all tools shortcuts.

Hehe, I was about to raise another thread with this issue :)


> I am alread about to clean up the shortcut definitions. In the tools and the PharoShortcuts class.

I was thinking of using PharoShortcuts and providing settings for them.


> But we still need a way to really define this in a customizable way.
>
> I already wrote about this and asked (ML or fogbugz, I don't remember).
> The current shortcut definitions (with pragmas for example). Can be browsed and in the Keymap browser (that is good), but they can not be changed of course, they are defined in the source.
> And, the current keymap definitions (KMKEyCombination) need a way to be able to read and write as a setting, that currently does not work (as I wrote).
>
> My proposition was, to define some kind of "Named-Keyaction" or "Named-Action", for example
>
> CopySelectionAction (name = CopySelection,  shortcut Ctrl+C), it would act as a KMKeyCombination, but its own shortcut (Ctrl+C) would be configurable.
>
> Now, in PharoShortcuts instead of
>
> PharoShortcuts >>#copySelectionShortcut
>
>     ^ $c meta
>
> we define
>
> PharoShortcuts >>#copySelectionShortcut
>
>     ^ CopySelectionAction withShortcut: $c meta

I was thinking to have directly the setting

PharoShortcuts >>#copySelectionShortcut
        ^ self shortcutFor: #copySelection default: [ $c meta ]

and in PharoShortcuts we have a dictionary out of which we can create settings.

Would this not be enough?

Doru


> (maybe on unique Instance of CopySelectionAction, or one per category)
>
> And the keymap browser, or the settings browser could list these actions and provide a way to reset the
> keycombination:
>
> CopySelectionAction  -   | type some keycombination here |
>
>
> The current way with the PharoShortcuts class and how the keys are binded to the tools don't really work for customizable shortcut definitions (or keymaps) or
>
> I just don't see it.
>
>
> nicolai
>
>
>  
>
> Doru
>
>
> > On Jun 8, 2016, at 11:33 AM, Esteban Lorenzano <[hidden email]> wrote:
> >
> >
> >> On 08 Jun 2016, at 09:04, stepharo <[hidden email]> wrote:
> >>
> >>  the fact that I cannot access Spotter without hurting my hand it is also probably why I do not try more.
> >
> > yeah, shortcut has to be configurable, for people with big hands :)
> >
> >
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Every now and then stop and ask yourself if the war you're fighting is the right one."
>
>
>
>
>
>

--
www.tudorgirba.com
www.feenk.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."





Reply | Threaded
Open this post in threaded view
|

Re: shortcut settings (was: Re: Playground and text evaluation printing result default.)

Nicolai Hess-3-2


2016-06-08 22:15 GMT+02:00 Tudor Girba <[hidden email]>:
Hi,


> On Jun 8, 2016, at 7:35 PM, Nicolai Hess <[hidden email]> wrote:
>
>
>
> 2016-06-08 19:11 GMT+02:00 Tudor Girba <[hidden email]>:
> Yes, we already agreed on that both for the debugger and for Spotter. We just did not get the chance to do it yet.
>
> Hey Doru,
>
> about your report
> https://pharo.fogbugz.com/f/cases/18455 Spotter shortcuts should be externalized as settings
>
> Please don't do this just for spotter. We really need a general solution for all tools shortcuts.

Hehe, I was about to raise another thread with this issue :)


> I am alread about to clean up the shortcut definitions. In the tools and the PharoShortcuts class.

I was thinking of using PharoShortcuts and providing settings for them.


> But we still need a way to really define this in a customizable way.
>
> I already wrote about this and asked (ML or fogbugz, I don't remember).
> The current shortcut definitions (with pragmas for example). Can be browsed and in the Keymap browser (that is good), but they can not be changed of course, they are defined in the source.
> And, the current keymap definitions (KMKEyCombination) need a way to be able to read and write as a setting, that currently does not work (as I wrote).
>
> My proposition was, to define some kind of "Named-Keyaction" or "Named-Action", for example
>
> CopySelectionAction (name = CopySelection,  shortcut Ctrl+C), it would act as a KMKeyCombination, but its own shortcut (Ctrl+C) would be configurable.
>
> Now, in PharoShortcuts instead of
>
> PharoShortcuts >>#copySelectionShortcut
>
>     ^ $c meta
>
> we define
>
> PharoShortcuts >>#copySelectionShortcut
>
>     ^ CopySelectionAction withShortcut: $c meta

I was thinking to have directly the setting

PharoShortcuts >>#copySelectionShortcut
        ^ self shortcutFor: #copySelection default: [ $c meta ]

and in PharoShortcuts we have a dictionary out of which we can create settings.

Would this not be enough?

I don't know. What would shortcutFor return ? Just a plain shortcut. If so,
changing this shortcut in the settings would only take an effect if (the user or the settings browser) triggers a
KMRepository reset.
And only for keybdings defined by a keymap pragma. If a tools had registered a direct keybinding on a Morph of an already opened tool, would this be updated as well?

 

Doru


> (maybe on unique Instance of CopySelectionAction, or one per category)
>
> And the keymap browser, or the settings browser could list these actions and provide a way to reset the
> keycombination:
>
> CopySelectionAction  -   | type some keycombination here |
>
>
> The current way with the PharoShortcuts class and how the keys are binded to the tools don't really work for customizable shortcut definitions (or keymaps) or
>
> I just don't see it.
>
>
> nicolai
>
>
>
>
> Doru
>
>
> > On Jun 8, 2016, at 11:33 AM, Esteban Lorenzano <[hidden email]> wrote:
> >
> >
> >> On 08 Jun 2016, at 09:04, stepharo <[hidden email]> wrote:
> >>
> >>  the fact that I cannot access Spotter without hurting my hand it is also probably why I do not try more.
> >
> > yeah, shortcut has to be configurable, for people with big hands :)
> >
> >
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Every now and then stop and ask yourself if the war you're fighting is the right one."
>
>
>
>
>
>

--
www.tudorgirba.com
www.feenk.com

"In a world where everything is moving ever faster,
one might have better chances to win by moving slower."






Reply | Threaded
Open this post in threaded view
|

Re: Playground and text evaluation printing result default.

Tudor Girba-2
In reply to this post by stepharo
Hi,

> On Jun 8, 2016, at 8:44 AM, stepharo <[hidden email]> wrote:
>
>>
>> Hi Stef,
>>
>> Thanks for the feedback. Sorry for the long email, but I you raised several issues and I thought it is worth addressing them.
>>
>> The feature we are talking about came into being after several suggestions on this mailing list (and quite some long discussions) that had the scenario of keeping track of several executions. In the first version of the Playground it was not possible to paste directly in the playground. We did not impose anything, it was the contrary.
>
> and the result is that I can spend time removing spurrious comments.
>> From your email I see that you would rather prefer the variant of embedding the text as is after pressing Enter. Is this correct?
>>
>> Here is another variant:
>> - Cmd+p
>> - Cmd+v ==> paste the string directly in the editor without comments
> why not.
> but this is confusing with copy paste.
> So will you corrupt the current selection.

Hmm. I do not see this one, so I need a bit more explanations. Here is what I understand:
- in the old editor, the behavior was that when you pressed Cmd+p, the printed text got selected
- in my proposal, you press Cmd+p,Cmd+v and you get exactly the same text selected.

Did I misunderstand something?

One note: Cmd+v would not imply copying to the clipboard.


> So should I trade copy/paste with getting a value printed.
> May be cmd+r for raw

This is tempting. How about Cmd+Shift+p (force print-it)?

This brings us to the cmd+shift issue. I wanted to ask for a longer time how do you press Cmd+Shift+n for references? Is there a difference in how you use the keyboard in that case? Please note that I am not mocking you. I want to know.


>> ...
>> This discussion is one of those. We wanted to solve the most often appearing case in which we use Cmd+p as a way to preview quickly the result. Pasting the code in the existing playground is an edge case for Cmd+p, not the primary case.
> how did you measure it?
> Because for me this is always the inverse.

I watched people deleting the printed code so many times, including me that this became frustrating enough to trigger a new solution. Then when we released the playground 2 years ago, people liked it and they only announced the need for a way to keep track of execution results.


>>> ...
>> Let’s do a remote session and I watch you do things. This week I am available this Thursday morning or Friday after 11.
> I'm not available. Going to hard rock concert with teenagers.

Have fun :). How about next week on Monday?

Cheers,
Doru

--
www.tudorgirba.com
www.feenk.com

"Every thing has its own flow."






Reply | Threaded
Open this post in threaded view
|

Re: Playground and text evaluation printing result default.

stepharo

>>> Hi Stef,
>>>
>>> Thanks for the feedback. Sorry for the long email, but I you raised several issues and I thought it is worth addressing them.
>>>
>>> The feature we are talking about came into being after several suggestions on this mailing list (and quite some long discussions) that had the scenario of keeping track of several executions. In the first version of the Playground it was not possible to paste directly in the playground. We did not impose anything, it was the contrary.
>> and the result is that I can spend time removing spurrious comments.
>>>  From your email I see that you would rather prefer the variant of embedding the text as is after pressing Enter. Is this correct?
>>>
>>> Here is another variant:
>>> - Cmd+p
>>> - Cmd+v ==> paste the string directly in the editor without comments
>> why not.
>> but this is confusing with copy paste.
>> So will you corrupt the current selection.
> Hmm. I do not see this one, so I need a bit more explanations. Here is what I understand:
> - in the old editor, the behavior was that when you pressed Cmd+p, the printed text got selected
> - in my proposal, you press Cmd+p,Cmd+v and you get exactly the same text selected.
We should stop to have this emacs plague.
And I can have something in my paste buffer and printing should not
remove it.

'KJHJKKJ' cmd C
cmd v ->  'KJHJKKJ'
1+3 cmd p should not destroy nor paste 'KJHJKKJ'
> Did I misunderstand something?
>
> One note: Cmd+v would not imply copying to the clipboard.
>
>
>> So should I trade copy/paste with getting a value printed.
>> May be cmd+r for raw
> This is tempting. How about Cmd+Shift+p (force print-it)?
Please consider that shift does not exist.
It forces thumb to do a bad gymnastic and for me it simply ***hurt***
physically so I never use bindings in Spotter with shift since
I want to make sure that I can continue to type on a keyboard.


>
> This brings us to the cmd+shift issue. I wanted to ask for a longer time how do you press Cmd+Shift+n for references? Is there a difference in how you use the keyboard in that case? Please note that I am not mocking you. I want to know.

left thumb (finder 1) on cmd
left finger 4 on shift and right finger 2
This position does not hurt but is not confortable because lock upper
case is just above.

>>> ...
>>> This discussion is one of those. We wanted to solve the most often appearing case in which we use Cmd+p as a way to preview quickly the result. Pasting the code in the existing playground is an edge case for Cmd+p, not the primary case.
>> how did you measure it?
>> Because for me this is always the inverse.
> I watched people deleting the printed code so many times, including me that this became frustrating enough to trigger a new solution. Then when we released the playground 2 years ago, people liked it and they only announced the need for a way to keep track of execution results.
I know.  Now remember the dancing bear and the woman that was asked to
try a new keyboard and that was sad that she could not adapt.
>>>> ...
>>> Let’s do a remote session and I watch you do things. This week I am available this Thursday morning or Friday after 11.
>> I'm not available. Going to hard rock concert with teenagers.
> Have fun :). How about next week on Monday?

I could around 16h

>
> Cheers,
> Doru
>
> --
> www.tudorgirba.com
> www.feenk.com
>
> "Every thing has its own flow."
>
>
>
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Playground and text evaluation printing result default.

Tudor Girba-2
Hi,

> On Jun 10, 2016, at 8:48 AM, stepharo <[hidden email]> wrote:
>
>>>>
>>>> Hi Stef,
>>>>
>>>> Thanks for the feedback. Sorry for the long email, but I you raised several issues and I thought it is worth addressing them.
>>>>
>>>> The feature we are talking about came into being after several suggestions on this mailing list (and quite some long discussions) that had the scenario of keeping track of several executions. In the first version of the Playground it was not possible to paste directly in the playground. We did not impose anything, it was the contrary.
>>> and the result is that I can spend time removing spurrious comments.
>>>> From your email I see that you would rather prefer the variant of embedding the text as is after pressing Enter. Is this correct?
>>>>
>>>> Here is another variant:
>>>> - Cmd+p
>>>> - Cmd+v ==> paste the string directly in the editor without comments
>>> why not.
>>> but this is confusing with copy paste.
>>> So will you corrupt the current selection.
>> Hmm. I do not see this one, so I need a bit more explanations. Here is what I understand:
>> - in the old editor, the behavior was that when you pressed Cmd+p, the printed text got selected
>> - in my proposal, you press Cmd+p,Cmd+v and you get exactly the same text selected.
> We should stop to have this emacs plague.
> And I can have something in my paste buffer and printing should not remove it.
>
> 'KJHJKKJ' cmd C
> cmd v ->  'KJHJKKJ'
> 1+3 cmd p should not destroy nor paste ‘KJHJKKJ'


I think you misunderstood. I meant:
Cmd+p ==> the print-it popup
Cmd+v ==> add the print-it text in the original text editor

So, the second step is a pseudo-mode with a visual feedback, not like in Emacs.

So, Cmd+v would leave the clipboard untouched, and ‘KJHJKKJ’ would still remain there.

But, perhaps Cmd+v is too much of an overlap.



>> Did I misunderstand something?
>>
>> One note: Cmd+v would not imply copying to the clipboard.
>>
>>
>>> So should I trade copy/paste with getting a value printed.
>>> May be cmd+r for raw
>> This is tempting. How about Cmd+Shift+p (force print-it)?
> Please consider that shift does not exist.
> It forces thumb to do a bad gymnastic and for me it simply ***hurt*** physically so I never use bindings in Spotter with shift since
> I want to make sure that I can continue to type on a keyboard.
>
>>
>> This brings us to the cmd+shift issue. I wanted to ask for a longer time how do you press Cmd+Shift+n for references? Is there a difference in how you use the keyboard in that case? Please note that I am not mocking you. I want to know.
>
> left thumb (finder 1) on cmd
> left finger 4 on shift and right finger 2
> This position does not hurt but is not confortable because lock upper case is just above.

Interesting. I am doing the same. So, what is the difference between this case and:
left thumb (finder 1) on cmd
left finger 4 on shift and right finger 2
right finger 4 or 5 on arrows
?


>>>> ...
>>>> This discussion is one of those. We wanted to solve the most often appearing case in which we use Cmd+p as a way to preview quickly the result. Pasting the code in the existing playground is an edge case for Cmd+p, not the primary case.
>>> how did you measure it?
>>> Because for me this is always the inverse.
>> I watched people deleting the printed code so many times, including me that this became frustrating enough to trigger a new solution. Then when we released the playground 2 years ago, people liked it and they only announced the need for a way to keep track of execution results.
> I know.  Now remember the dancing bear and the woman that was asked to try a new keyboard and that was sad that she could not adapt.
>>>>> ...
>>>> Let’s do a remote session and I watch you do things. This week I am available this Thursday morning or Friday after 11.
>>> I'm not available. Going to hard rock concert with teenagers.
>> Have fun :). How about next week on Monday?
>
> I could around 16h

Great. I booked it in my calendar.


Cheers,
Doru


>>
>> Cheers,
>> Doru
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "Every thing has its own flow."

--
www.tudorgirba.com
www.feenk.com

"Sometimes the best solution is not the best solution."


12