[squeak-dev] Metaclass allInstancesDo:

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Jan 5 10:57:08 UTC 2010


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



More information about the Squeak-dev mailing list