Re: WIDGETS - AGAIN [message #2887] |
Fri, 02 September 1994 04:57 |
stl
Messages: 70 Registered: February 1994
|
Member |
|
|
In article <345rn2$346@hammer.msfc.nasa.gov> mallozzi@ssl.msfc.nasa.gov writes:
>
> But if I then use XMANAGER,'name',id, control passes to the widget,
> but how do I then transfer back to $MAIN$ (or the calling procedure)
> after I make my selection?
> (I also want to have the current values stored in the widget text
> fields available in $MAIN$).
Okay, here is the problem. As soon as you start programming with
XMANAGER, main really no longer exists, because once the application is
started, EVERYTHING is event driven! IE: there is no main, and the
program flow and control is centered around some kind of huge
interpointing state variables that are held in various uvalues of
differetn widgets. By using windget_info and widget_control you can
access almost anything (as long as you have the widget id (or parent or
sibling) in you state structure). Does this make sense?
In otherwords action X results from pushing say a button. ANd
another button causes action y. X and Y might be programs called
from within the event handles, or they might just be a few lines of
code.
Now that you are writing code around an interface, WIDGETS, you no
longer must follow a straight work flow, since the user always has
lots of options. You know need to write code based on ACTIONS or
just based around the functionality of a certain window, and you
have to know what widget opened this window, etc..
let me know if this makes 0 sense. I will mail you back with some
example or something or we can discuss this more.
hope this helps,
-stephen
>
> I noticed that if I just use WIDGET_EVENT in the procedure that builds
> the widget, I can grab the event and continue on in $MAIN$, but I am
> then limited to making a selection immediately after the widget is
> built, and rebuilding after every slection isn't very elegant! The IDL
> manual (with its infinite wisdom!) says "widget applications should always
> use XMANAGER in preference to calling WIDGET_EVENT directly". OK, good,
> but how do I grab the event and return to $MAIN$?
>
> Thanks for your time, and I would appreciate any further help.
>
> Your fellow IDL fanatic,
> Bob Mallozzi
> mallozzi@ssl.msfc.nasa.gov
>
--
Stephen C Strebel / SKI & TELE TO DIE
strebel@sma.ch / and
Swiss Meteorological Institute, Zuerich / LIVE TO TELL ABOUT IT
01 256 93 85 / (and pray for snow)
|
|
|