comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: 'remote control' for widgets?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: 'remote control' for widgets? [message #33225] Mon, 16 December 2002 07:56 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
s@visita2.die.upm.es (s@visita2.die.upm.es) writes:

> Btw, neither the "Using IDL" nor the Building IDL Apps"
> manual for IDL 5.4 does mention the word "SENT_EVENT"...

You are reading the wrong books. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: 'remote control' for widgets? [message #33226 is a reply to message #33225] Mon, 16 December 2002 07:35 Go to previous messageGo to next message
s[1] is currently offline  s[1]
Messages: 21
Registered: December 2002
Junior Member
Hi Dave & David,

thanks for the tip - I got it working now, the solution is:
a) "WIDGET_CONTROL, myWidget, SET_VALUE=myValue" to set the
slider/button/whatever
b) "WIDGET_CONTROL, myWidget, SEND_EVENT={ID:myWidget, TOP:myBase,
HANDLER:0L,VALUE:myValue}" to create the event so that all the stuff in
the event handler gets called.

That's quite cumbersome, but it works, although I would prefer a solution
like
WIDGET_CONTROL, myWidget, SET_VALUE=myValue, /CREATE_EVENT
that does the event creation automagically.

Btw, neither the "Using IDL" nor the Building IDL Apps"
manual for IDL 5.4 does mention the word "SENT_EVENT"...

Best regards,

Sebastian
Re: 'remote control' for widgets? [message #33230 is a reply to message #33226] Mon, 16 December 2002 05:10 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
s@visita2.die.upm.es (s@visita2.die.upm.es) writes:

> I try to progammatically set values of widgets like sliders or checkboxes.
> When I use "WIDGET_CONTROL,myWidget,SET_VALUE=myValue", only the widget
> gets changed, but the appropriate event is not generated.
>
> What I am looking for is a technique taht allows me to change the value of
> a widget _and_ generates the event that would have been generated if I
> had changed the widget using the mouse or keyboard.

Widget_Control, myWidget, Send_Event=thisEventStruct

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: 'remote control' for widgets? [message #33231 is a reply to message #33230] Mon, 16 December 2002 05:03 Go to previous messageGo to next message
David Burridge is currently offline  David Burridge
Messages: 33
Registered: January 1998
Member
Hi Sebastian,

Have you considered using the "Send_Event" keyword to Widget_Control? You'll
have to build the event structure, but it would do exactly what you want.
For example, assuming your event below is a button (simplest example:-) you
could:

Widget_Control, myWidget, Set_Value={ID:myWidget, TOP:myTLB, HANDLER:0L,
SELECT:1L}

If you don;t know the ID of the top-level base (myTLB), you *could* use
Widget_Info to find it I guess, but the best would be to pass it through.

Does this help?

Dave

--
David Burridge
Burridge Computing, 18 The Green South
Warborough, Oxon, OX10 7DN
England
Tel: +44 (0) 1865 858279, Email: davidb@burridgecomputing.co.uk

<s@visita2.die.upm.es> wrote in message
news:Pine.LNX.4.44.0212161243430.3160-100000@visita2.die.upm .es...
> Hi all,
>
> I try to progammatically set values of widgets like sliders or checkboxes.
> When I use "WIDGET_CONTROL,myWidget,SET_VALUE=myValue", only the widget
> gets changed, but the appropriate event is not generated.
>
> What I am looking for is a technique taht allows me to change the value of
> a widget _and_ generates the event that would have been generated if I
> had changed the widget using the mouse or keyboard.
>
> Thanks for all tips,
>
> Sebastian
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.404 / Virus Database: 228 - Release Date: 15/10/2002
Re: 'remote control' for widgets? [message #33288 is a reply to message #33226] Mon, 16 December 2002 17:10 Go to previous messageGo to next message
MKatz843 is currently offline  MKatz843
Messages: 98
Registered: March 2002
Member
> Btw, neither the "Using IDL" nor the Building IDL Apps"
> manual for IDL 5.4 does mention the word "SENT_EVENT"...

That's because it's "SEND_EVENT"

M. Katz
Re: 'remote control' for widgets? [message #33299 is a reply to message #33226] Mon, 16 December 2002 13:46 Go to previous messageGo to next message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
We all dislike the lack of accuracy in IDL documentation, but, to give
RSI some justice, SEND_EVENT is documented in the online help. A quick
search immediately finds it in the WIDGET_CONTRL section.
Cheers,
Pavel

s@visita2.die.upm.es wrote:
>
>
> Btw, neither the "Using IDL" nor the Building IDL Apps"
> manual for IDL 5.4 does mention the word "SENT_EVENT"...
>
Re: 'remote control' for widgets? [message #33402 is a reply to message #33230] Fri, 20 December 2002 13:10 Go to previous message
Stein Vidar Hagfors H[2] is currently offline  Stein Vidar Hagfors H[2]
Messages: 28
Registered: October 2002
Junior Member
David Fanning <david@dfanning.com> writes:

> s@visita2.die.upm.es (s@visita2.die.upm.es) writes:
>
>> I try to progammatically set values of widgets like sliders or checkboxes.
>> When I use "WIDGET_CONTROL,myWidget,SET_VALUE=myValue", only the widget
>> gets changed, but the appropriate event is not generated.
>>
>> What I am looking for is a technique taht allows me to change the value of
>> a widget _and_ generates the event that would have been generated if I
>> had changed the widget using the mouse or keyboard.
>
> Widget_Control, myWidget, Send_Event=thisEventStruct

Sigh... This reminds me of a program I once wrote (xrecorder) that would
"infest" *any* widget program by installing its own routines as widget event
handlers, to record the events... You could in fact record a complete
demonstration session for any widget program, store it, and replay it (with
the correct functionality - even moving the cursor over the screen to the
right buttons etc to aid the eye, and with the recorded [editable] timing
between each event, you could even edit the script to insert comments that
would pop up on screen). The nice thing was that *nothing* had to be changed
in the original programs. The only restriction was that the *structure* of the
widget program could not (of course) be changed between recording and
replaying.

Of course, the whole darn thing broke when IDL introduced a new version with
their "real modal widgets"). Ah, those were the days, when xmanager,/modal
worked. At least *one* person got to use it for a real-world application
(demonstrating the functionality of a relatively large software suite) before
it got obsoleted, and it was a lot of fun to make!

--
------------------------------------------------------------ --------------
Stein Vidar Hagfors Haugan
ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO

NASA Goddard Space Flight Center, Tel.: 1-301-286-9028
Mail Code 682.3, Bld. 26, Room G-1, Cell: 1-240-354-6066
Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: How do I get the path for a UNIT of a file?
Next Topic: My Christmas Wish...

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:53:40 PDT 2025

Total time taken to generate the page: 0.00501 seconds