Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form property destroyed before Unload fires!
Message
De
21/08/2002 15:59:26
Michael Kinnell
Community Living Services
Wayne, Michigan, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Form property destroyed before Unload fires!
Divers
Thread ID:
00692183
Message ID:
00692183
Vues:
55
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
Fil
Voir

Click here to load this message in the networking platform