Simulator design question
david at aminal.com
david at aminal.com
Thu Sep 6 22:38:28 UTC 2001
Slowly but surely, I'm trying to put together the basics for my
network simulator. The pointers to the blue book helped, but
much of what I want to do is very different from the examples.
My first stumbling block (it didn't take very long <g>) is how
to model the network nodes. Each instance of a Node needs it's
own unique identifier, and needs to communicate with other specific
nodes. Nodes generate this id at the time the instances are created.
So, I guess my question is , how do I make my Node instance known to
the rest of the Smalltalk environment by its unique identifier? Is it
possible to create global variables on-the-fly?
In a workspace it seems so simple,
uniqueID1 := Node new.
uniqueID2 := Node new.
etc.
But I don't see how to do this in a 'new' method, where the variable name
is generated and then pointed at the resulting instance.
Any suggestions greatly appreciated :-)
David Schutt
More information about the Squeak-dev
mailing list
|