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

Home » Public Forums » archive » Common block conumdrum
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: Common block conumdrum [message #8423 is a reply to message #8355] Wed, 05 March 1997 00:00 Go to previous messageGo to previous message
Phil Williams is currently offline  Phil Williams
Messages: 78
Registered: April 1996
Member
John-David Smith wrote:
>
> Struan Gray wrote:
>
>> This works but has it's own problems. I often need to have the
>> state information when the widget is killed so that I can save
>> parameters and variables to disk or pass a response to another widget.
>> David's technique works well if you can be sure that the user will
>> only ever kill the widget with 'close'/'quit'/'cancel' buttons, but if
>> the widget can be killed another way (with the xmanager tool or via a
>> close box provided by the operating system's window manager) I find
>> that by the time my widget knows it is being killed only the top level
>> base remains and my state information is lost.
>
> XMANAGER's CLEANUP callback mechanism gives you control of your dying
> widget after almost all of it has been killed. This is problematic,
> since you often can't then get to your state info.
>
> A technique I often use to prevent this behaviour is the KILL_NOTIFY
> mechanism. Its use is strongly discouraged in various IDL references,
> but the thrust of the warning is "don't assign a kill_notify procedure

<snip>

Figured I'd add my 2 cents again. They way I handle this is to have a
handle that would have any "global" data. Then any additional "global"
data that I needs I simply make a child handle of that main handle. I
then share this handle with any of my widgets that need it. If a popup
then dies the "main" widget still knows where the handle is and is also
responsible for it's cleanup when it dies.

It is my understanding that with IDL 5.0 that we are going to be more
careful with issues such as these since you will be able to run widgets
and still have access to the command line.

Good luck,
Phil
--
/*********************************************************** ********/
Phil Williams, Ph.D.
Research Instructor
Children's Hospital Medical Center "One man gathers what
Imaging Research Center another man spills..."
3333 Burnet Ave. -The Grateful Dead
Cincinnati, OH 45229
email: williams@irc.chmcc.org
URL: http://scuttle.chmcc.org/~williams/
/*********************************************************** ********/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Command line history in IDLWAVE shell
Next Topic: Debugging overload

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

Current Time: Sun Oct 12 07:18:17 PDT 2025

Total time taken to generate the page: 6.95761 seconds