> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> [EMAIL PROTECTED]
> Sent: Tuesday, February 27, 2007 3:24 PM
> To: [email protected]
> Subject: RE: Confused about new things in RB
>
>
> On Feb 27, 2007, at 22:46 UTC, Tim Hare wrote:
>
> > 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.
>
> In other words, there is only one instance of that variable, which
> retains its value from call to call (regardless of what object you call
> it by), and which is accessible only within that method.
>
> It is exactly the same in both cases.  I don't understand the
> distinction you're trying to make, and AFAIK, there is none to be made.

Let me try to put it another way.  The distinction is probably better
highlighted by comparing the class vs. the instance.  If you were to put the
static variable in the Action event of the instance, then it acts in the
traditional manner.  If you use that same static in the class, then it acts
slightly differently.

All I'm saying is if you've been editing instances all day, and then you go
to put some code in the class itself, beware the inclination to use a static
instead of a property.

Tim

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.4/703 - Release Date: 2/26/2007
2:56 PM

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to