smalltalk - pharo creating a global variable like transcript -
i want create variable named mamegap accessible every where. can print words transcript ex. method of class. want mamegap too.
i tried
mamegap:= myclass new. smalltalk at: #mymap put: mamegap.
i want access mamegap this
dosomething: avar |x| x:= mamegap getint. ^x*3
you have do:
smalltalk at: #mamegap put: myclass new
also can put there class object,
smalltalk at: #mamegap put: myclass
and sen class-side messages
Comments
Post a Comment