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

Home » Public Forums » archive » Re: Ghost Widgets!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Ghost Widgets! [message #77428] Tue, 30 August 2011 13:22
David Fanning is currently offline  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 Go to previous message
pfp is currently offline  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 Go to previous message
bill.dman is currently offline  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 Go to previous message
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Put a 2d plot and an image into a 3D coordinate system
Next Topic: last call before delivering GDL 0.9.2

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

Current Time: Wed Oct 08 13:45:29 PDT 2025

Total time taken to generate the page: 0.00703 seconds