Pool Variables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Pool Variables

Joseph Alotta
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?


On Jun 29, 2013, at 7:00 AM, [hidden email] wrote:

> Yes, class variables will be visible to subclasses of subclasses and so on.
> Also, I didn't mention pool variables, but 99.9% of the time you won't want
> to use those.

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

RE: Pool Variables

Ron Teitelbaum
Hi John,

You might want to parse a configuration file but you are not sure where it
is used.  You could share these values using pool variables.  

It actually is useful but you can certainly accomplish this may other ways.

All the best,

Ron Teitelbaum

> -----Original Message-----
> From: [hidden email] [mailto:beginners-
> [hidden email]] On Behalf Of Joseph J Alotta
> Sent: Monday, July 01, 2013 11:16 PM
> To: [hidden email]
> Subject: [Newbies] Pool Variables
>
> 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?
>
>
> On Jun 29, 2013, at 7:00 AM, [hidden email]
> wrote:
>
> > Yes, class variables will be visible to subclasses of subclasses and so
on.
> > Also, I didn't mention pool variables, but 99.9% of the time you won't
> > want to use those.
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Pool Variables

K K Subbu
In reply to this post by Joseph Alotta
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

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Pool Variables

Louis LaBrunda
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:[hidden email] http://www.Keystone-Software.com

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners