DELVAR in widget-based app? [message #3244] |
Mon, 28 November 1994 10:33  |
hschult
Messages: 5 Registered: February 1994
|
Junior Member |
|
|
Hello,
in a widget-based application (IDL Version 3.5), when the user wants to start
analyzing a new data set, I need to release the windows and arrays from the
previous set. WDELETE is fine for the windows, but what about the arrays?
Can I use DELVAR somehow?
1) Does it work for arrays and vectors of structures?
2) The manual states, "DELVAR can onnly be called from the main program level"
How does this fit in with an event-driven widget application where the
main level is controlled by XMANAGER?
Thanks for any help,
.Howard Schultens hschult@gwdg.de
|
|
|
Re: delvar [message #14246 is a reply to message #3244] |
Fri, 05 February 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Dominic Zarro (zarro@tidalwave.net) writes:
> The following may not guarantee that a variable
> is permanently deleted from IDL memory, but it
> is useful for undefining the variable:
>
> IDL> a = temporary(a)
>
> The above call can be used at the main or procedure
> level.
Hey! Come on. You're giving away all the secrets!
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: delvar [message #14247 is a reply to message #3244] |
Fri, 05 February 1999 00:00  |
Dominic Zarro
Messages: 7 Registered: July 1998
|
Junior Member |
|
|
The following may not guarantee that a variable
is permanently deleted from IDL memory, but it
is useful for undefining the variable:
IDL> a = temporary(a)
The above call can be used at the main or procedure
level.
|
|
|
Re: delvar [message #14255 is a reply to message #3244] |
Thu, 04 February 1999 00:00  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
Dave Brennan wrote:
>
> Hi
>
> I was wondering, is there another way of deleting variable to clear
> memory other than using delvar. The probelm with delvar is that it
> resets the main program, thus stopping the remainder from being
> processed.
>
> Thanks for your help
>
> Dave Brennan
Use undefine.pro from David Fanning at http://www.dfanning.com/
Martin.
--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA
phone: (617)-496-8318
fax : (617)-495-4551
e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
|
|
|
Re: delvar [message #14260 is a reply to message #3244] |
Thu, 04 February 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Dave Brennan (9147261b@clinmed.gla.ac.uk) writes:
> I was wondering, is there another way of deleting variable to clear
> memory other than using delvar. The probelm with delvar is that it
> resets the main program, thus stopping the remainder from being
> processed.
Huh!? I don't think so. Can we have an example of how
you are using this? I've never known this to happen with
DELVAR. You could try my UNDEFINE programs, which has the
advantage of working inside of programs and not just at the
main IDL level, but I suspect DELVAR is not really your
problem. :-)
ftp://www.dfanning.com/pub/dfanning/outgoing/idl_examples/un define.pro
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|