Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Private data Session
Message
From
29/05/2002 11:12:13
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00662505
Message ID:
00662511
Views:
11
>Hi,
>
>I have a Private Data session form , with one File in DE (called KMA)
>Also have a simple MyPrg1.prg with two lines:
>Sele KMA
>Brow
>
>I have two buttons, each which call MPPrg in different way
>MyButt1: Do MyPrg1
>MyButt2: On Key Label F10 do MyPrg1
>
>If I click button 1, Mprg1 runs ok
>If I click Button 2,and F10, I get an error saying Alias Kma not found
>
>Now if I change the screen to a Deafult Data session, all is ok !!
>
>Is there some inherent problem using Private datasessions and an On Key Label ??
>
>If so, is there a workaround. In my calling prg, I want to set a few on key label commands so tht they stay in place for the duration of the app.
>
>Any help appreciated.
>regards,
>
>Gerard

Hmmm... looks like the OKL uses the default data session.

In general, I have the impression that most programmers discourage OKL. Personally, I avoid it, at least in most cases.

Try using a menu shortcut instead.

Another workaround might be to intercept Form.KeyPress (you must also set Form.KeyPreview to .T.).

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform