[squeak-dev] Urgent: how to define a global?

Chris Muller ma.chris.m at gmail.com
Wed Oct 29 18:53:27 UTC 2014


Trying to debug a server, need to define a global OrderedCollection
"X" which I want to put debugging objects into.  In a workspace, I
type:

X := OrderedCollection new

System asks me to correct or define a global.  I choose to define a global.

But I still cannot access X.  It keeps asking me to correct or define
a global.  Yippee, great thing to happen at 4am when you just need to
debug something!

Digging in shows that when I try to access X, it ends up looking in
Smalltalk environment 'bindings' IdentityDictionary, but when I
defined X, it put the binding #X=>nil into Smalltalk environment
'declarations' only.

I don't know what 'declarations' vs. 'bindings' are and I don't care,
I just need to be able to define the global, could someone pelase tell
me the proper fix?

  a) Defining X should put it in 'bindings' instead of 'declarations'?
  b) Accessing X should access from 'declarations' instead of 'bindings'?
  c) Defining X should put it in BOTH  'declarations' and 'bindings'?


More information about the Squeak-dev mailing list