Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Holding the name of a control as a string?
Message
From
05/03/2002 16:49:39
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00628023
Message ID:
00628698
Views:
40
Chris,

BTW, I left an important lines out of my queryUnload() examples...put a return .f. for failure, and return .t. for success.

What line causes an error message?

What code do you use to launch a new form? If you something like the following, there is no need to evaluate:
* this is at form launch
lcForm = "testform"
do form (lcForm) name oApp.topForm  && property topForm must already exist in oApp
later, to see if you can close form:
if oApp.topform.queryunload()
>Thanks - that was only idea to stop this problem with the form not firing the lost focus... but I will put in anyway - I think that's really good!
>
>I am struggling with this...
>
>The name of the form I store as a string in oApp.TopForm...
>
>
>case .pNodeValue = 9
>if !oApp.TopForm = ""
>local strCheckQU
>strCheckQU = evaluate(oApp.TopForm)
>if strCheckQU.queryunload()
>
>if !oApp.TopForm = "frmcontacts" AND !oApp.TopForm = ""
>oForm.mCloseForm(oApp.TopForm)
>endif
>if !oApp.BottomForm = ""
>oForm.mCloseForm(oApp.BottomForm)
>endif
>oForm.mLaunchForm('frmcontacts')
>oApp.CaptionPLus = " :: [Customers]"
>endif
>else
>if !oApp.TopForm = "frmcontacts" AND !oApp.TopForm = ""
>oForm.mCloseForm(oApp.TopForm)
>endif
>if !oApp.BottomForm = ""
>oForm.mCloseForm(oApp.BottomForm)
>endif
>oForm.mLaunchForm('frmcontacts')
>oApp.CaptionPLus = " :: [Customers]"
>endif
>
>
>That throws an error... "Variable Name of the form not found..."
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform