Re: How to cleanup an object with a non-modal widget method [message #88073 is a reply to message #88066] |
Tue, 18 March 2014 17:58   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
Mathew, David -- thanks for the suggestions. Sorry if this post appears twice -- Google groups is driving me crazy.
On Monday, March 17, 2014 6:02:00 PM UTC-4, Matthew Argall wrote:
> A simple solution would be to turn "displaymap" into a function so that you can return your oAstroMap object reference. Then, when you are done with it, you can destroy it.
I am trying to write a wrapper for non-IDL users. I want them to be able to type "displaymap" at the IDL prompt and view and manipulate the widget, without them needing to perform any additional cleanup after they click the widget QUIT button.
>
> Maybe more to what you are looking for, check out the TLB_KILL_REQUEST_EVENTS and KILL_NOTIFY keyword to the Widget_Base function. You can have the callback routines kill the object when the top level base is destroyed.
I'll look more closely at these but it still looks like the object has to destroy itself (and not just the widget), and I haven't had much luck with OBJ_DESTROY, self. Perhaps I need to also write the wrapper as an object.
>
> I have another, more complicated solution if neither of these work for you... Is AstroMap object based on function/object graphics? Or is it made from the old widgets?
No, it uses "classic" widgets with Coyote graphics. --Wayne
|
|
|