Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with Private data Session
Message
 
To
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:
00662796
Views:
16
Hilmar, thanks for your reply.

I'm wondering how a menu Shoertcut would work ? . I have a global ON Key F10 which activates a lookup if the user is on a particular text box.

Regards,

Gerard


>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform