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

Home » Public Forums » archive » Re: Leaving XMANAGER
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: Leaving XMANAGER [message #46731] Mon, 12 December 2005 09:54
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> You want to read this article:
>
> http://www.dfanning.com/widget_tips/widget_tips/popup.html

Whoops! A few too many widget_tips in there. Sorry.

http://www.dfanning.com/widget_tips/popup.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Leaving XMANAGER [message #46732 is a reply to message #46731] Mon, 12 December 2005 09:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
James Everton writes:

> Hope your holidays are all going well. Lucky for me, mine can't
> actually start until I get some IDL programming done, so here I am
> asking for a little help.
>
> I'm writing a function at the moment that uses widgets, and since I'm
> still learning my way around IDL, I'm using XMANAGER at the moment to
> handle all of my events. However, in my widgets, I have a button that,
> once pushed, needs to have the main function exit and return a 1,
> whereas if they hadn't pushed the button and had closed the program, it
> would return a -1.
>
> The problem I'm having is that when I enter XMANAGER after the button
> gets pushed, I can close down the widget using:
>> WIDGET_CONTROL, event.top, /DESTROY
> however, I can't find a way to have a variable passed back to the main
> function that originally called XMANAGER, so that I can return from
> there with a 1.
>
> I tried attaching a variable to the uvalue of my button and modifying
> that in the XMANAGER event, but I soon found out that when I destroy
> the widget hierarchy in my event handler, I can't use the button's
> uvalue because (*gasp*) it got destroyed already.
>
> Is there some way to pass a variable to XMANAGER outside of the widget
> hierarchy, or maybe have XMANAGER somehow return out of my function
> with the 1 that I want it to?

Pointers. :-)

You want to read this article:

http://www.dfanning.com/widget_tips/widget_tips/popup.html

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Leaving XMANAGER
Next Topic: Saving more than one image in a widget

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

Current Time: Fri Oct 10 16:34:01 PDT 2025

Total time taken to generate the page: 3.03620 seconds