Re: Ghost Widgets! [message #77428] |
Tue, 30 August 2011 13:22 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
pfp writes:
> This is what I was expecting. Is this not the same problem of the
> widgets being halted by the breakpoint as
>
> http://www.idlcoyote.com/misc_tips/breakptrun.html
>
> ?
Probably, but shouldn't the "kill" event still be
registered (after all, it *has* occurred!) when the
program resumes with the RETALL? It seems to me
a call-back is a different sort of an animal from
a simple widget event.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Ghost Widgets! [message #77429 is a reply to message #77428] |
Tue, 30 August 2011 13:13  |
pfp
Messages: 12 Registered: July 2009
|
Junior Member |
|
|
On Aug 30, 11:48 am, David Fanning <n...@idlcoyote.com> wrote:
> David Fanning writes:
>> You might think the solution would be to exit
>> the stopped routine after I had killed the
>> widget and before I compiled and ran the
>> program again. But, even this doesn't work.
>> I just can't figure out a way to get into
>> my clean-up routine from withing a stopped
>> program.
>
> If I return out of the stopped program, THEN
> kill the window, all is well. But, does anyone
> understand why this would be the case?
This is what I was expecting. Is this not the same problem of the
widgets being halted by the breakpoint as
http://www.idlcoyote.com/misc_tips/breakptrun.html
?
|
|
|
Re: Ghost Widgets! [message #77432 is a reply to message #77429] |
Tue, 30 August 2011 10:31  |
bill.dman
Messages: 17 Registered: June 2007
|
Junior Member |
|
|
Hi David,
I'm not sure, but this might be worth a try:
;=========================================================== ========
;+
; NAME: runwids
; ONELINER: An IDL batch file (script) that activates non-blocked
widgets after a STOP is encountered
; FACILITY: Debugging, widgets, stop, xmanager
; LANGUAGE: IDL
; EXECUTABLE:
; USAGE: @runwids (Then, use control-C to return to the command
line when ready)
; URL:
; AUTHOR: w dieckmann, inspired by comp.lang.idl-pvwave
; CREATED: 2004-08-31
;
; ARGUMENTS:
;
; RETURNS:
;
; MODIFIED:
;
; DESCRIPTION: Non blocking widgets and iTools come to a screeching
halt when a STOP is
; encountered. This script reactivates the widgets until
control-C is pressed,
; which returns control to the command line in the
context of the STOP. Note,
; you should wait until widget event code or iTool
calculations are complete
; before doing control-C, or you can end up in the
context of those codes.
;-
print, '@runwids: Running widget events. Press control-C to stop.' $
& while 1 do begin & wait, 0.05 & undefine, widget_event(/NOWAIT) &
endwhile
|
|
|
Re: Ghost Widgets! [message #77438 is a reply to message #77432] |
Tue, 30 August 2011 07:48  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> You might think the solution would be to exit
> the stopped routine after I had killed the
> widget and before I compiled and ran the
> program again. But, even this doesn't work.
> I just can't figure out a way to get into
> my clean-up routine from withing a stopped
> program.
If I return out of the stopped program, THEN
kill the window, all is well. But, does anyone
understand why this would be the case?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|