On 28/02/2007, at 7:46 AM, Tim Hare wrote:
> A word of caution regarding static variables. When used in a
> method in a
> class definition, static variables are global to all instances of that
> class. When used in a method of, say, a window, then they are
> local to the
> window and act like statics from other languages, retaining their
> value from
> one call to the next.
Please provide a clearer example of how they differ.
Static means one copy of the state and accessible only from where it
is declared.
It has nothing to do with objects or windows.
As far as I can see, there are no subtle distinctions and I've just
tested it to prove that a static in a Window event certainly behaves
as expected.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|