Information générale
Titre:
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?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement