[Newbies] Pool Variables

Louis LaBrunda Lou at Keystone-Software.com
Tue Jul 2 13:45:18 UTC 2013


Hi Joseph,

>On Tuesday 02 July 2013 08:46 AM, Joseph J Alotta wrote:
>> Just curious, can someone give me an real life example of when you would need to use pool variables and no other variable would work?
>
>Generally information from external world are made available through 
>pool variables since they are broadly consumed by many classes. Examples 
>are
>  * Physical or Math constants like pi, e, ...
>  * Conventional names for weeks, months, colors, directions, playing 
>cards, chess pieces.
>  * Elements of binary file headers
>  * Character and Font tables
>  * Sensor events coming from hardware devices (like button codes)
>
>Explore
>
>    SharedPool subclasses
>
>to see real-life usage in method source codes.
>HTH .. Subbu

I agree with Subbu.  If you take a look at my contribution:
http://ss3.gemstone.com/ss/minecraft.html/Overview?_s=pxWnk5AQYKMk4B4B&_k=EP_TzpOiAQnnFmJw

to Bert's Minecraft bindings you will see how I use them to make the calls
to Minecraft read better and make it so you don't have to remember what
number (value) goes with what Minecraft color or texture.

I have also recently used one in some of my VA Smalltalk GUI programs to
hold an object with some help information, like where the user was in
various layers of windows and panes within windows.  I could have passed
this object into each window but it is a lot of work just to avoid using
what amounts to a global variable.

Lou
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com



More information about the Beginners mailing list