[squeak-dev] Case sensitive "source with it" works in MVC but not in Morphic, what to do?

Chris Muller asqueaker at gmail.com
Mon May 13 21:54:44 UTC 2013


We actually don't have a lot of hot keys left available, so we should
make them for heavily used functions.  So let's make sure, whatever we
decide, that we get a "good payback" for whatever available
keys/gestures we give up.  Command+S is already used for "Format",
which I use for every single method edit where, for me anyway, "Method
source with it" is used once a year.  Command+e is already taken for
the "Exchange" command, which is extremely useful, there's no way we
can ditch that for "method strings with it".

Let me ask, other than Bert's and my usage for Shift-clicking a menu
(to easily browse the code which invokes that function), is there ANY
other practical use-case for "editable menu entry"?  It actually
doesn't even seem to work -- I just tried to "change" a menu item but
it didn't let me type more than one character and, even then, it
didn't persist the next time the menu came up.  So, what's it good
for?


On Mon, May 13, 2013 at 9:36 AM, David T. Lewis <lewis at mail.msen.com> wrote:
> On Mon, May 13, 2013 at 12:42:19PM +0200, Bert Freudenberg wrote:
>>
>> On 2013-05-13, at 02:48, David T. Lewis <lewis at mail.msen.com> wrote:
>>
>> > On Fri, May 10, 2013 at 09:38:28AM -0400, Bob Arning wrote:
>> >> Maybe, but what's happening here is in MenuItemMorph:
>> >>
>> >> mouseDown: evt
>> >>    "Handle a mouse down event. Menu items get activated when the mouse
>> >> is over them."
>> >>
>> >>    evt shiftPressed ifTrue: [ ^super mouseDown: evt ].  "enable label
>> >> editing"
>> >>    evt hand newMouseFocus: owner. "Redirect to menu for valid transitions"
>> >>    owner selectItem: self event: evt
>> >>
>> >> I see this code as far back as squeak 3.2 with a 10/10/2000 date and
>> >> Andreas's initials. If you comment out the first line, you get the
>> >> behavior David was looking for. It would be interesting to know who
>> >> might be using this feature.
>> >>
>> >> Cheers,
>> >> Bob
>> >
>> > Aha! I suspect that no one is using that feature at all.
>>
>> I use it: shift-click followed by CMD-E is the quickest way to look at the implementation behind a menu item. OTOH, a morphic halo menu entry might be more appropriate for that function.
>>
>
> I see no straightforward way to eliminate the conflict between conflict
> between usage of shift state for Morphic, versus usage of shift state to
> control case sensitive search.
>
> Adding menu items for the case sensitive searching works fine, though I'm
> afraid that it would make the menus too cluttered. Basically it would
> change menus from this:
>
>     #-.
>     {'selectors containing it (W)' translated.    #methodNamesContainingIt}.
>     {'method strings with it (E)' translated.     #methodStringsContainingit}.
>     {'method source with it' translated.          #methodSourceContainingIt}.
>     {'class names containing it' translated.      #classNamesContainingIt}.
>     {'class comments with it' translated.         #classCommentsContainingIt}.
>     {'change sets with it' translated.            #browseChangeSetsWithSelector}.
>     #-.
>
> to something that might look more like this:
>
>     #-.
>     {'selectors containing it (W)' translated.    #methodNamesContainingIt}.
>     {'method strings with it' translated.         #methodStringsContainingit}.
>     {'method strings with it matching case (E)' translated.  #methodStringsMatchCaseContainingit}.
>     {'method source with it' translated.          #methodSourceContainingIt}.
>     {'method source with it matching case' translated.        #methodSourceMatchCaseContainingIt}.
>     {'class names containing it' translated.      #classNamesContainingIt}.
>     {'class comments with it' translated.         #classCommentsContainingIt}.
>     {'class comments with it matching case' translated.       #classCommentsMatchCaseContainingIt}.
>     {'change sets with it' translated.            #browseChangeSetsWithSelectorMatchingCase}.
>     #-.
>
> So maybe a different approach is better. Perhaps we could leave menus and
> shift key handling as they are, and accept the conflict in Morphic, but add
> some additional hot key support. Currently <alt>E will invoke case-sensitive
> "method strings with it". We could add definitions for other functions, such as:
>
>     <alt>E => case-sensitive method strings with it
>     <alt>e => non-case-sensitive method strings with it
>     <alt>S => case-sensitive method source with it
>     <alt>s => non-case-sensitive method source with it
>
> and the menu might look like this:
>
>     #-.
>     {'selectors containing it (W)' translated.      #methodNamesContainingIt}.
>     {'method strings with it (e) (E) ' translated.  #methodStringsContainingit}.
>     {'method source with it (s) (S)' translated.    #methodSourceContainingIt}.
>     {'class names containing it' translated.        #classNamesContainingIt}.
>     {'class comments with it' translated.           #classCommentsContainingIt}.
>     {'change sets with it' translated.              #browseChangeSetsWithSelectorMatchingCase}.
>     #-.
>
> Just a thought.
>
> Dave
>
>
>


More information about the Squeak-dev mailing list