Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class on form will not address form's objects
Message
 
 
To
15/07/2008 13:49:31
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01331442
Message ID:
01331445
Views:
9
>Hi. I dropped a class onto a form. Attempting to have a method (in my class) change button captions in my form.
>I cannot refence form objects from the class.
>
>Thanks, Randy

From the class instance on the form you can reference form's objects. From the class code itself it's better to not reference any other objects (even this.parent may be a bit problematic) to avoid tight coupling.

Also it's better to reference form's objects in form's method, IMO.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform