Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Help! Method call
Message
De
08/03/2001 15:52:30
 
 
À
08/03/2001 13:30:38
Spencer Redfield
Managed Healthcare Northwest, Inc.
Portland, Oregon, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00483248
Message ID:
00483315
Vues:
11
>Hi all,
>
>I am stumped and really need some help!
>
>My application's main form calls a second (modal) form.
>In that second form I call a method back in the first
>form that returns a unique primary key value.
>
>Here's the line (in 2nd form) that calls the method in the first form:
>
> lcNewPrimKey = .oParams.oCallingForm.GetNewKey()
>
>I can set step on and watch the GetNewKey() method execute just fine.
>It generates the expected (type char) return value and assign it to
>the return variable. The debugger displays the value correctly, i.e.
>"00001234".
>
>The method's last line returns the value:
>
> return lcRetVal
>
>Stepping out of this line (and back into the second form) things
>get weird. The value assigned to lcNewPrimKey by GetNewKey() is
>now .NULL.
>
>The results are the same if I hard code the return value in
>GetNewKey() to be:
>
> return "00001234"
>
>The variable lcNewPrimKey is still assigned .NULL.
>
>What am I missing? Neither my Manager nor I can figure it out.
>Can anyone explain what's happening? Thanks!
>
>BTW, I'm running VFP 6, SP3 on Windows 2000 (no SP)

Not sure on this, but it may have something to do with a modal form running a method in the called form. Just for grins, try making the modal form modeless temporarily and try watching the code in the debugger. You might also try temporarily placing a copy (if possible) of the GetNewkey() method in the modal form and calling it. Just some things to try to give food for thought.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform