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

Home » Public Forums » archive » Re: Passing info and destroying widgets...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Passing info and destroying widgets... [message #15890 is a reply to message #15879] Mon, 21 June 1999 00:00 Go to previous messageGo to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
Liam.Gumley@ssec.wisc.edu writes:

> If I understand your question correctly, you are trying
> to figure out how to pass a value from a widget event
> manager back to the calling program (i.e. the one that
> invoked XMANAGER) after the top level widget has been
> destroyed. The answer in IDL5 is pointers.

Or objects. Or handles (well *I* like 'em).

I have a number of browser widgets dedicated to a particular
filetypes which I call from other widgets and from the command line.
When they die, their cleanup routine looks to see if the top level
base had a group leader. If it did, and information needs to be
passed upwards, the widget sends a custom event to the group leader
which contains the relevant data. If not, the dying widget pops up a
dialog asking if the user wants to keep the data in memory, and if the
answer is yes, prints out the object/handle/pointer id by which the
data can be globally accessed.

I'm currently playing with a refinement where all my widgets
become objects, and I can invoke certain methods from dying child
widgets, thus bypassing the event queue should I want to force a
particular excecution order. Looks cool.

As a rule I like to put all such code in a cleanup routine rather
than in the event handler. I've been caught out too many times by the
multitude of ways that widgets can be killed other than through an
author-defined 'quit' button - for example, via the window manager,
from XTOOL and when a group-leader dies.


Struan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: object suggestion for future IDL versions
Next Topic: Re: reading and plotting CDF from within IDL

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

Current Time: Fri Oct 10 18:39:01 PDT 2025

Total time taken to generate the page: 1.64636 seconds