Issue 7049 in pharo: Strange protocol: #allSelectorsWithout: + autocompletion + traits

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issue 7049 in pharo: Strange protocol: #allSelectorsWithout: + autocompletion + traits

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Bug

New issue 7049 by [hidden email]: Strange protocol:  
#allSelectorsWithout:  + autocompletion + traits
http://code.google.com/p/pharo/issues/detail?id=7049


The only user of it is NECTypedModel
(yes, an infamous autocompletion)..

and the problem is that such method does not exists for Traits.. (probably  
because it makes no sense for traits at all)
so if you try to type in trait's method, autocompletion will constantly bug  
you with such DNU.

I do not understand, why Behavior needs such method at all. I do not see  
how it can be 'core' or 'highly important' feature, Behavior can live  
without.

I think this method should be either used as extension of autocompletion  
package, or better just implemented in autocompletion package itself.
And of course it should be fixed for traits.

The implementation of this method is also strange:

allSelectorsWithout: behaviors
       "Returns all the selectors of the receiver and its superclasses,  
except the ones define in behaviors"
        | selectors |
        selectors := IdentitySet new.
        self withAllSuperclassesDo: [:class | (behaviors includes: class)
                                                                                        ifFalse: [selectors addAll: class selectors.]].
        ^ selectors asOrderedCollection

why it cares about answering results as ordered collection? For the name of  
method, set would be more than enough.
If results needs to be present to user(s), this is wrong place where one  
should care about it.
UI should sort things, not model(s), especially in such basic place as  
Behavior.



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker