Initializing and using class variables
ducasse at iam.unibe.ch
Mon Jan 20 11:28:28 UTC 2003
usually you initialize classVariable in the initialize of the class
(class method initialize) which is invoked once when the class is
loaded (at the end of the load). You can also use lazy initialization.
On Monday, January 20, 2003, at 12:21 PM, Ralf Bokelberg wrote:
> How can i initialize and use class variables ?
> Is initialize ever executed by the class ?
> "Initialize the class variables"
> Transcript show: 'Initializing class WorldBouncer '; cr.
> CoeffDrag _ 0.03.
> Gravity _ 9.81.
> "WorldBouncer initialize."
> "Initialize the instance"
> Transcript show: 'Initializing instance of WorldBouncer. Gravity: ';
> Gravity; cr.
> "Why Gravity is nil ?"
> kind regards
Prof. Dr. Stéphane DUCASSE (ducasse at iam.unibe.ch)
"if you knew today was your last day on earth, what would you do
different? ... especially if, by doing something different, today
might not be your last day on earth" Calvin&Hobbes
More information about the Squeak-dev