Home »
Public Forums »
archive »
Re: Cross platform Widget_Table
Re: Cross platform Widget_Table [message #38187 is a reply to message #38186] |
Tue, 24 February 2004 14:33  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Ben Tupper wrote:
>
> Hello,
>
> I have been skittering around all day with widget tables. It's quite a
> (re)learning curve everytime I use 'em.
>
> I have set up the program to "autosave" every time the user changes the
> contents of a field. So, I have set up the table with EDITABLE = 1 and
> ALL_EVENTS = 0 (events for end-of-line insertion only). This is the
> behavior I desire and it works fine... but, I wonder if the end-of-line
> insertion is the same on all platforms.
>
> Here's a little example on a Mac OSX...
>
> (1) User edits a value and hits <return>
>
> this generates 2 "WIDGET_TABLE_CH" events, the first has ev.CH = 10B
> and the second has ev.CH = 13B
>
> (2) User edits a value and hits the keyboard up-arrow or down-arrow
>
> this generates a single "WIDGET_TABLE_CH" event with ev.CH = 13B
>
> (3) User edits a value and hits the keyboard <tab> or <shift-tab>
>
> this generates a single "WIDGET_TABLE_CH" event with ev.CH = 13B
>
> I have been assuming that I can simply look for ev.CH = 13B before doing
> my "AutoSave" thing. But then I read the "String Composition" thread of
> this week.
>
> Are these the end-of-line insertion events same on other systems? I
> have pasted simple test code below if your willing to test it.
For both
{ x86 linux unix linux 5.5a Feb 7 2002 32 32}
and
{ ibmr2 AIX unix AIX 5.5 Aug 28 2001 32 32}
I get the same behaviour as yours. Hitting return generates the ev.CH = 10B AND ev.CH =
13B events.
IDL> .run blah
% Compiled module: TABLE_WIDGET_EXAMPLE3_QUIT_EVENT.
% Compiled module: TABLE_WIDGET_EXAMPLE3_TABLE_EVENT.
% Compiled module: TABLE_WIDGET_EXAMPLE3.
IDL> TABLE_WIDGET_EXAMPLE3
% Compiled module: XMANAGER.
EditEvent: 13 <--- down arrow
EditEvent: 13 <--- tab
EditEvent: 10 <----- <return>
EditEvent: 13 <--'
paulv
--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
|
|
|
Current Time: Sat Oct 11 08:14:40 PDT 2025
Total time taken to generate the page: 1.20276 seconds