I want to create a variable named MameGap which is accessible from every where. I can print some words to transcript for ex. from a method of a class. I want to do this for MameGap too.
I tried something like this
MameGap:= MyClass new.
Smalltalk at: #myMap put: MameGap.
I want to access MameGap like this
doSomething: aVar
|x|
x:= MameGap getInt.
^x*3
You have to do:
Smalltalk at: #MameGap put: MyClass new
also you can put there just a class object, like
Smalltalk at: #MameGap put: MyClass
and sen to it class-side messages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With