realbasic-nug
[Top] [All Lists]

RE: Confused about new things in RB

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: RE: Confused about new things in RB
From: kev <lists at slothsound dot com>
Date: Tue, 27 Feb 2007 20:04:57 -0800
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <20070228032219 dot 21BBA70275D at mail dot verex dot com>
Ahh.. so nice to start an interesting discussion!

So, my question is... When do you use a Static vs. a Shared Property?

Any examples/tutorials floating around? Sounds like a good RBDev or 
RBlib article...




>On Feb 27, 2007, at 23:51 UTC, Tim Hare wrote:
>
>>  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.
>
>I'm not sure what you mean by this.  As a static variable, it's a
>single global value that's only accessible from within the method.
>
>>  If you use that same static in the
>>  class, then it acts slightly differently.
>
>How does it act slightly differently?  It's a single global value
>that's only accessible from within the method, no matter where you do
>it.  I can see no difference whatsoever.
>
>I'm not trying to pick on you here; I think one of us is confused about
>how static variables work, and if that's the case, there are probably
>others here that are confused too.  Seems worth a bit of effort to get
>to the bottom of it.
>
>Best,
>- Joe
>
>--
>Joe Strout -- joe at strout dot net
>Verified Express, LLC     "Making the Internet a Better Place"
>http://www.verex.com/
>
>_______________________________________________
>Unsubscribe or switch delivery mode:
><http://www.realsoftware.com/support/listmanager/>
>
>Search the archives:
><http://support.realsoftware.com/listarchives/lists.html>

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

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


<Prev in Thread] Current Thread [Next in Thread>