Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSession problem related to function keys - Is this a bug
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
DataSession problem related to function keys - Is this a bug
Divers
Thread ID:
00403617
Message ID:
00403617
Vues:
53
Is this a bug in VFP6 or am I doing something wrong?

- Form A is modeless and has a private datasession. It has a button that invokes Form B.

- Form B is modal and has a private datasession. It also has
ON KEY LABEL F2 DO junkprg
in the load method.

- Junkprg is a program that, among other things, contains
SET DATASESSION TO (l_nvariable)
I run Form A and press the button to invoke Form B. Then I press F2 to run the code that does a bunch of stuff, including changing the datasession. I've traced through the program and as soon as the SET DATASESSION TO command executes in the prg, the datasession of both Form A and Form B get popped to l_nvariable. I was anticipating that only Form B would get changed since that is the current _SCREEN.ActiveForm.

I'm thinking this is a bug because if I call the PRG using a button instead of F2, only the datasession of Form B gets changed as I expected. Or if the F2 key invokes a method of Form B instead of a PRG, it also works as expected and only changes Form B. It's only when I use the combination of a function key calling a PRG that both datasessions get changed.

Totally Confused!
Cathy
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform