From VisualWorks® NonCommercial, 7.4 of December 5, 2005 on May 10, 2006 at 5:14:50 pm
CormasNS.Kernel.CormasModel entities - access
theEntities: aClass
"Returns a indexedSet of all the instances of aClass collected by cormasModel."
| collec |
collec := self perform: ('the' , aClass name asString , 's') asSymbol.
"If theXXXs method does not return an Indexedset, theXXXs is dynamically rebuilt as :
theXXXs
^theXXXs ifNil:[theXXXs := IndexedSet new]"
collec ifNil:
[self class createReaderAccessor: aClass name.
collec := self perform: ('the' , aClass name asString , 's') asSymbol].
^collec