Next: , Previous: The start Method, Up: General Class Issues



5.1.2 The init Method

Every class has an init method, which is run by Storage as part of the object creation and wrapping process. The init method, as a minimum, takes an object record for Storage and LanguageStrings and takes the object's own Oz name.

NOTE: The init method should only be called once for the entire lifetime of the object. Anything that is not absolutely permanent should not be passed to init. Also, an init record can be passed to createObject on Storage, but be aware that Storage will change the name of the record to init and tack on three arguments at the beginning for the Oz name and the Storage and LanguageStrings object references.