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:56:30
 
 
To
05/03/2002 16:49:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00628023
Message ID:
00628706
Views:
44
Steve,

I agree with you. I have played with Chris' actual code for a while now, and have discovered that it is the setfocus call in the lostfocus that is causing this problem. I haven't found anything in the KB or wikis that document this. I wonder what the smallest demonstrable code is.

Perhaps antoher rainy day project.

Chris,

I would go by Steve's recommendation. There may be some funky bit of code that would make the whole thing work, but it would be a kludge at best. On a lighter note, I was very impressed with your UI design. Kudos.


>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..."
Brian McCord
President
Sagacity Systems
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform