General information
Title:
Form property destroyed before Unload fires!
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only