Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
(Formnamehere) vs. Thisform
Message
From
15/09/2011 16:54:23
 
 
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:
01523664
Views:
89
>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 using DO FORM you culd add NAME clause to assign variable reference to form: DO FORM (formname) NAME (variable)
* Perhaps you can assign THISFORM to a variable (this needs to be set within one of the methods) -- that'll give you a variable that you can use to reference the form object.
* When you call external procedure or function from within a method of the form, pass THISFORM. Then in the called procedure or function you've got a reference to the form.
Previous
Reply
Map
View

Click here to load this message in the networking platform