Re: IDL Runtime [message #28020 is a reply to message #27930] |
Wed, 14 November 2001 07:03   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Andre Kyme <nak@imag.wsahs.nsw.gov.au> writes:
>
> I've developed a widget program which must now be run on IDL runtime.
> Problem is that whenever a "Cancel" button is selected (which
> should return execution to the initial menu options) the entire program
> exits and IDL too! Does anyone know why this is? I'm using the RETALL
> command in the program to return to the top level (which is XMANAGING
> the menu) when "cancel" is pressed. It seems to be working fine with
> the normal development license??
This is a "doctor, it hurts when I do this" type of question. (Doctor:
"Then don't do that.")
I would argue that the only use for the RETALL command is in
interactive debugging of programs, and it should never be used in
production programs. As you have just pointed out, RETALL takes away
all of your control of the program flow. In your specific case, a
return to the main level apparently causes the runtime to exit. There
are well established means to return from a widget, like
"WIDGET_DESTROY" followed by RETURN.
Good luck,
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|