Keyevents won't turn off in O$10.22 31896

malkishtini at gmail.com malkishtini at gmail.com
Sun Jan 29 17:18:21 UTC 2023


Hi Ben,
You need to access the property by using the full notation to your object.
I'm not sure what itrDateis, is it a reference to the field in your window or the field name?

If I were you, I would confirm that this change will solve my problem first, change the property in design mode and set it to kFalse and then test, if it works then you need to access the property using the full notation to the object.
    Do $cinst.$objs.<yourfieldname>.$keyevents.$assign(kFalse)
OR
    Do $cwind.$objs.<yourfieldname>.$keyevents.$assign(kFalse)

HTH,
Mayada
-----Original Message-----
From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf Of Ben Weinberg
Sent: Sunday, January 29, 2023 12:11 PM
To: omnisdev-en at lists.omnis-dev.com
Subject: Re: Keyevents won't turn off in O$10.22 31896

Hi Mayada:

I just checked the keyevents on one of the fields and set it to kfalse using  Do itrDate.$keyevents.$assign(kFalse)
I confirmed it changed from true to false but the keyevents still got processed when I Returned out of the field.

Ben

> On Jan 29, 2023, at 8:49 AM, <malkishtini at gmail.com> <malkishtini at gmail.com> wrote:
> 
> Hi Ben,
> Have you checked the $keyevnets attribute (on the Action tab) of the fields in your window? Based on the help comment "the object property only applies when the $clib.$prefs.$keyevents is kFalse".
> 
> HTH,
> Mayada
> 
> -----Original Message-----
> From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> On Behalf 
> Of Ben Weinberg
> Sent: Saturday, January 28, 2023 6:41 PM
> To: omnisdev-en at lists.omnis-dev.com
> Subject: Keyevents won't turn off in O$10.22 31896
> 
> Hi listers:
> 
> I’m having a problem with keyevents on O$10.22 31896 where they can’t be turned off.   Do $clib.$prefs.$keyevents.$assign(kFalse) will change the state of library:keyevents from true to false but keyevents are still enabled.  I’m doing this to control the field-to-field flow for the user where entering a new record will tab through the fields regardless of the user pressing Enter or Return, but not tab when the user is Editing a field.  This used to work in O$8 and I tested a library that was converted from 8 to 10 and it shows the same problem.  Is this a bug in O$10 ?
> 
> Library Properties shows: keyevents kTrue
> 
> Open a window that contains a pushbutton and an several entry fields:
> 
> Pushbutton
> $event
> On evClick
> Do $clib.$prefs.$keyevents.$assign(kFalse)
> 
> Library Properties shows: keyevents kFalse
> 
> Entry field
> $event
> On evKey
> If (pSystemKey=28)|(pSystemKey=29)
> Queue tab
> Quit event handler (Discard event)
> End If
> 
> Pressing return in this field performs a tab to the next entry field 
> regardless of the state of library:keyevents 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com Start a 
> new message -> mailto:omnisdev-en at lists.omnis-dev.com
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com Start a 
> new message -> mailto:omnisdev-en at lists.omnis-dev.com

_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list