> Extra credit: Why would you use a class variable? We know that an instance
> variable is used to store data within the context of an instance. Why would
> you want to store data in the context of a class?
Window closeAllWindows needs to have a list of all the windows, and sends each
one the close message. Or if a instance of a class needed to communicate with
other members of its class. For example, a class of helicopter bots that fly
together as a group. They would need talk to each other to avoid collisions.
Sincerely,
Joe.
--
View this message in context:
http://forum.world.st/FileDirectory-tp4897377p4897633.html
Sent from the Squeak - Beginners mailing list archive at Nabble.com.
_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners