Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form property destroyed before Unload fires!
Message
From
21/08/2002 15:59:26
Michael Kinnell
Community Living Services
Wayne, Michigan, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Form property destroyed before Unload fires!
Miscellaneous
Thread ID:
00692183
Message ID:
00692183
Views:
56
I have a form that was working in VFP 3b and is no longer working in VFP 7 (SP1). The form is called expecting data back:

DO myForm TO myVariable

in the KeyPress() method of a control on the form I am saving a value from a control to a property of the form:

.
.
.
CASE nKeyCode = 13 && Enter
thisform.cKey = thisform.grid1.column1.text1.value
thisform.Release()
.
.
.

Then in the Unload() method I'm returning the value which is then stored in myVariable:

LOCAL m.lcKey
m.lcKey = thisform.cKey
RETURN m.lcKey


This used to work fine in VFP 3 and according to the Hackers Guide should be the way to do it in 7 as well. What I'm getting is a random value returned to myVariable, When I step through the code using the debugger I find that the form properties are destroyed before the Unload() method is fired leaving no value for cKey.


Is this a bug? Is there a work around?
Next
Reply
Map
View

Click here to load this message in the networking platform