Object factory... Is that how it's called??

Bert Freudenberg bert at impara.de
Mon May 8 15:04:02 UTC 2006


Am 08.05.2006 um 15:25 schrieb Cédrick Béler:

> Michel Calonne a écrit :
>
>> My question is, how should I do to create an instance of, for  
>> example, a 'toto' class (yes, it is a String, readen from the xml  
>> file)??
>>
> otherwise maybe:
> (Smalltalk at: 'toto' asSymbol ifAbsent:[^nil]) to get the class  
> from a String

Better yet:

	Smalltalk classNamed: 'Toto'

(btw, regular class names are always capitalized)

- Bert -




More information about the Squeak-dev mailing list