Re: Cross platform Widget_Table [message #38184] |
Tue, 24 February 2004 15:12 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ben Tupper writes:
> On the Winders machine, are you sure you have edited (changed) the cell
> value before hitting TABs? It isn't enough to simply select the cell
> (at least not on my platform).
>
> If it is true that you can change the value of the cell then hit TAB
> without generating an end-of-line event then I might have a wee problem.
Yep, change the value, hit TAB. I get a chirp which makes
me look over my shoulder, but no event reported from your
event handler. The new value "sticks" and I move to the next
cell.
Cheers,
David
P.S. Let's just say an object isn't what I would wrap this
up in. Around my house, we use old newspaper for this kind
of thing. :-)
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Cross platform Widget_Table [message #38185 is a reply to message #38184] |
Tue, 24 February 2004 15:02  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
David Fanning wrote:
> Ben Tupper writes:
>
>
>> I have been skittering around all day with widget tables. It's quite a
>> (re)learning curve everytime I use 'em.
>
>
>> 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.
>
>
> I have a firm rule that I *never* answer questions about the Table
> Widget because every time I play with the thing my blood pressure
> rises dangerously. But, for you Ben...
>
> On my Windows machine (Windows 2000, IDL 6.0):
>
> I get a 13B event if I hit RETURN. I don't see any event at
> all in the event handler for TABs (my machine beeps at me
> like I'm doing something wrong!) or arrow keys (although I
> move to a new cell on both tabs and arrows.
>
> There you go. Don't you love it! :-)
>
> Now, where is that medicine... :-(
>
> Cheers,
>
> David
>
Thanks Paul and David,
I know what you mean, David. I thought that fer-sure some expert would
wrap the widget table up in a friendly object. (Eh-hem) I, too, avoid
them when I can. But I seem to be working with vectors of structures
as a handy way to organize flat databases.
On the Winders machine, are you sure you have edited (changed) the cell
value before hitting TABs? It isn't enough to simply select the cell
(at least not on my platform).
If it is true that you can change the value of the cell then hit TAB
without generating an end-of-line event then I might have a wee problem.
Thanks,
Ben
|
|
|
Re: Cross platform Widget_Table [message #38186 is a reply to message #38185] |
Tue, 24 February 2004 14:53  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ben Tupper writes:
> I have been skittering around all day with widget tables. It's quite a
> (re)learning curve everytime I use 'em.
> 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.
I have a firm rule that I *never* answer questions about the Table
Widget because every time I play with the thing my blood pressure
rises dangerously. But, for you Ben...
On my Windows machine (Windows 2000, IDL 6.0):
I get a 13B event if I hit RETURN. I don't see any event at
all in the event handler for TABs (my machine beeps at me
like I'm doing something wrong!) or arrow keys (although I
move to a new cell on both tabs and arrows.
There you go. Don't you love it! :-)
Now, where is that medicine... :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
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
|
|
|