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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -