Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
(Formnamehere) vs. Thisform
Message
 
 
To
14/09/2011 11:56:36
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01523519
Message ID:
01523520
Views:
98
>One of my forms all of a sudden does not understand it's reference to the name. I get an error that the (formname) does not exiist. Clearly the form is loaded in on screen in the background. If I change the reference to thisform.object it recognises it until it runs into the next one with formname.object. I could rename all code on the form to be thisform, but certain areas like the main prg and other parts do not allow use of thisform to reference, you must use the name of the object. In the debugger screen I put in thisform.name and it shows the name of form on the screen which is correct, if I put in thisform.objectname it shows me it in the list as an object, but if I put FORMNAME.object I will see "Expression could not be evaluated". How can it say the name of the currect form is that, but can not reference it by that name anymore. Can anyone explain to me how this happens and how I can correct it?

When you call the form use this syntax

do form myFormName NAME FormReference

FormReference.DoSomething()

In the form itself you need to reference it using thisform and not by name reference.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform