Automatic selection of '--all--'

Doug Way dway at riskmetrics.com
Thu Dec 19 05:03:12 UTC 2002


I agree with Stephane and Andreas that the most straightforward solution 
is to just show all method names (and the class template) when no method 
category is selected.

If we do this, there are still a couple of minor points:

- I assume that we would get rid of the '-- all --' category, since you 
would already have a way to display all method names.  It also might 
make things a little cleaner for the Browser to have one less special 
pseudo-category to deal with.

- We would still have the 'no messages' pseudo-category which shows up 
when a new class is created.  So you could still select this category if 
you want to add new methods which would show up as 'as yet unclassified'.

Anyway, 3.4 is almost finalized (in a couple of weeks), so these 
enhancements will have to wait for 3.5alpha.  The current behavior (not 
including the recent #5137 fix attempt) has existed for a couple of 
years, so it seems reasonable to wait.

If Dean or anyone else wants to try fixing it, that would be great.  
Some of the Browser code can be tricky, but it should be doable. :-)  
Otherwise I might try fixing it in a few weeks.

- Doug Way


On Wednesday, December 18, 2002, at 04:25 PM, Andreas Raab wrote:

> Dean and all,
>
> There's no reason to flame nor to blame here. This entire thread has
> been taken out of context of other messages. So let's try to summarize:
> There is an apparent problem at this point if you try to add class
> variables. This is because there is a pattern match in the browser
> trying to recognize the '*subclass:' for class definitions if the '--
> all --' category is selected. The proposal has been made to change the
> pattern match that it "better recognizes" any attempt to define a class
> when you hit accept while '-- all --' is selected.
>
> Looking at the code it appeared to me that all of this is due to the
> fact that if the '-- all --' category is selected we may or may not try
> to define a class or a message. Since a category is selected you may
> expect to define a message. But since the '-- all --' category shows the
> class definition when selected it is equally reasonable trying to define
> a class rather than a message. That's the heart of the problem.
>
> My proposal was basically recognizing the fact that if a category is
> selected you should expect to edit a method and not a class definition.
> There is nothing wrong with the '-- all --' category itself. What is
> wrong is the inability to distinguish between "class definition mode"
> and "method definition mode" when '-- all --' is selected. One way of
> solving this problem would be show all of the selectors even if no
> category is selected. This preserves the intent of automatically
> selecting the '-- all --' category (namely to give an overview of the
> entire protocol of some class) without getting into the trouble of
> trying to do magic pattern matches if it is selected. In which case it'd
> be very simple: You select a method category, you edit a method. You
> have no category selected, you edit the class definition.
>
> That's really all there is to it.
>
> Cheers,
>   - Andreas




More information about the Squeak-dev mailing list