[squeak-dev] Metaclass allInstancesDo:
Igor Stasenko
siguctua at gmail.com
Tue Jan 5 11:14:47 UTC 2010
2 cents.
If some application (like EToys) providing some extension mechanism, or hooks,
it should provide a clear interface for it, so external components may
register with it and unregister by will.
Using a class hierarchy for such task seems a bad style , as to me.
2010/1/5 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
> I removed (Metaclass>>#allInstancesDo:) in my image, and now know why
> it was included:
>
> EToyVectorVocabulary>>morphClassesDeclaringViewerAdditions
> "Answer a list of actual morph classes that either implement
> #additionsToViewerCategories,
> or that have methods that match #additionToViewerCategory* ."
>
> ^(Morph class allSubInstances select: [ :ea | ea
> hasAdditionsToViewerCategories ])
>
> This method is dead slow...
>
> In my image, this sentence answers true:
> Morph class allSubInstances asSet = Morph withAllSubclasses asSet.
>
> Is there a reason to use allSubInstances ?
>
> Nicolas
>
>
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|