[squeak-dev] Broken menu in explorer

tim Rowledge tim at rowledge.org
Thu May 10 22:36:59 UTC 2018



> On 10-05-2018, at 2:55 PM, tim Rowledge <tim at rowledge.org> wrote:
> 
> 
> 
>> On 10-05-2018, at 12:19 PM, karl ramberg <karlramberg at gmail.com> wrote:
>> 
>> I think we can remove 'browse class' from both Inspector and ObjectExplorer if they just do the same thing as 'browse full'
> 
> Done for ObjectExplorer at least.

Hmph. The Inspector situation is just silly. The menu includes both
		('browse full (b)'					browseMethodFull)
and
		('browse class'						browseClass)
#browseClass does what one might expect. #browseMethodFull accidentally does the same thing because no Inspector class actually implements #selectedMessageName as anything other than ^nil and so StringHolder>>#browseMethodFull only ever opens a full browser. The right thing here is to just remove that entry from the menu.

But wait, it gets more insane! #browseClass actually delegates (in StringHolder) back to #browseMethodFull!

I think what has happened her over time is that somewhere #browseClass and 'browse full' have got confused in people's minds because of poor choices in naming things. ToolSet (etc) > browseClass actually open a full multi-pane class browser, not a single class browser. Add in the somewhat strange hierarchy around StringHolder and #browseMethodFull which is intended to open a full class browser with the class and method pre-set and we have a recipe for trouble. 

An Inspector clearly isn't going to be opening the latter and making sensible use of #browseMethodFull. (Actually one might just possibly make sense of it within a CompiledMethodInspector? But we don't) So, what I'm going to do here is
remove the 'browse class' menu entry
make the 'browse full' menu entry refer to #browseClass since we widely use 'browse full' that way
similar for the key:from: method
make Inspector>browseClass actually directly do a #browseClass
I'm fairly sure that would strictly mean #selectedMessageName could be removed from Inspector


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Manual Writer's Creed:  Garbage in, gospel out.




More information about the Squeak-dev mailing list