Jeremy

Well that 'skit' has made made my day :-)

So some good has come from it.


Neven

As Homer Simpson (my hero BTW) says.....DOH DOH DOH DOH !!!!!!
I was declaring the variable int eh WRONG place. I SHOULD have been declaring the variable under the


    -----Original Message-----
    *From:* [EMAIL PROTECTED]
    [mailto:[EMAIL PROTECTED] *On Behalf Of *Jeremy Coulter
    *Sent:* Wednesday, 9 June 2004 22:46
    *To:* [EMAIL PROTECTED]
    *Subject:* [DUG] Tricky Problem?

HI All.
I have been having a play around with something that at first
seemed quite easy to do, but is now turning into a small nightmare.
What I have is ONE MDI Child form that I create multiple times.
On this MDI Child I have a global variable called "iCount"
I have a label on it, and a button. The OnClick event of the
button does INC(iCount); and puts the new value on the label.
Now, I run my app, and make 2 instances of the form using
Application.CreateForm.
I now click the button on "form 1" 2 times, which put "2" in the
label.
I now go to "form 2", and click the button once, and the label
says "3", when in SHOULD be just "1"
This indicates that even tho the forms are new instances, they
share the same variables.
I then thought, hey I will put each one on a different thread, but
the problem...or rather situation stays the same.
This might infact be normal behaviour for an MDI form, because I
am really only creating a new instance of a FORM not the code
behind it, BUT is there a way around this?
Ideally I really want...no...NEED it so they dont share the same
global vars etc.
Cheers,
Jeremy Coulter
------------------------------------------------------------------------
All email scanned with Nortons Antivirus 2003
------------------------------------------------------------------------


------------------------------------------------------------------------

_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi



-- Neven MacEwan (B.E. E&E) Ph. 09 621 001 Mob. 0274 749062

_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to