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