On 28/02/2007, at 4:02 PM, Tim Hare wrote:

> OK, let's try a stupid little example.  Let's say I start a new  
> project and
> on Window1, I drag out 2 pushbuttons.  Now I put the following code  
> into the
> action event of PushButton1:...
> ...think that's pretty cool, so I do the same thing in PushButton2.

you have the static in two functions - Window1.PushButton1.Action and  
Window1.Pushbutton2.Action

therefore there are two statics.


> It occurs to me at this point that instead of copying the code from  
> button
> to button, that a subclass would be easier and a lot more fun.  So  
> I create
> a class, call it myButton and make its super PushButton.  I copy my  
> code
> into the Action event and I'm ready to roll.

you have the static in one function MyButton.Action

I think you're stretching to manage to call it a newbie mistake.

As an expert in achieving them, I'd label this a classical Creative  
Confusion - it took a lot of effort to think yourself into it :-)

One of the things I **really do like** about the new IDE is the  
Location field and the fact that things like  
Window1.Pushbutton2.Action are visible addresses.

You can think of static variables as bound to those addresses.

Window1.PushButton1.Action.myCount

Window1.Pushbutton2.Action.myCount

and in the second case, just

MyButton.Action.myCount
_______________________________________________
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