Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form and called Class - Parentage
Message
From
20/07/2011 15:18:13
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01518685
Message ID:
01518694
Views:
50
Likes (1)
>The code in frmA does this....
>
>Thisform.p_ITM = CREATEOBJECT('itm')
>
>So... when I want to set or see properties in 'itm'.... I can call the code
>
>Thisform.p_ITM.p_A = 'this' likewise Thisform.p_ITM.p_B = 'that'
>But what if I am in class ITM code and I want to set the property in frmA ??
>
>Like this??
>
>frmA.p_C = 'me'
>I get frmA object does not exist.
>So.... how do I refer back to the frmA and it's properties?
>
>Thanks a bunch!

instead of thisform.xxx = createobject() use

thisform.addobject("xxx", "itm")

as this will add the itm object to the controls collection of the form and give itm a parent link.
Also gives you automatic cleAN UP ON DESTROY.

HTH

thomas
Previous
Reply
Map
View

Click here to load this message in the networking platform