Re: Beginner Question: Disappearing Info Structure/Motion Events [message #27527] |
Sun, 28 October 2001 15:54 |
Ted Cary
Messages: 53 Registered: October 2001
|
Member |
|
|
Thanks for the help,
(The original message back there is from me, writing as Sandy from
work--it's the default in the computer I have there).
I thought I checked all my event handlers before I posted the message. I
got tired of looking and just continued the program without No_Copy set, and
then went back and turned it on in all the event handlers after everything
else was working. It works fine, but I still don't know what I was missing
earlier, or what I changed in the meantime to make it work now. Next time I
will send you the program.
">
> No, I can assure you IDL is fast enough. :-)
>
> I'm guessing that one or more of your event handlers
> is not "checking in" the info structure before it
> exits. This is the classic symptom of that error.
>
> Make sure that everywhere you check the info structure
> out you also check it in before you leave that event
> handler. (A RETURN somewhere other than at the end
> of the procedure is a great place to look.)
>
> If worst comes to worst, send me your program.
> If I can't spot this error with 30 seconds I
> buy you a beer. :-)
>
> Cheers,
>
> David
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Beginner Question: Disappearing Info Structure/Motion Events [message #27586 is a reply to message #27527] |
Thu, 25 October 2001 15:03  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
sandy (sehgal@oasis.rad.upenn.edu) writes:
> The Event Handler for my program can't seem to "check out" and replace
> the Info Structure of event.top fast enough using the No_Copy technique
> when Motion_Events is set in a draw widget. The Info Structure always
> becomes undefined, so that the next time it's needed the program
> crashes. Normally this occurs, not surprisingly, as soon as the mouse
> is moved, when another motion event is generated
>
> It works if I just don't set the No_Copy keyword, but this bothers me
> because David Fanning says I should be concerned about memory management
> (I got your new book two weeks ago). There must be something I'm not
> understanding.
No, I can assure you IDL is fast enough. :-)
I'm guessing that one or more of your event handlers
is not "checking in" the info structure before it
exits. This is the classic symptom of that error.
Make sure that everywhere you check the info structure
out you also check it in before you leave that event
handler. (A RETURN somewhere other than at the end
of the procedure is a great place to look.)
If worst comes to worst, send me your program.
If I can't spot this error with 30 seconds I
buy you a beer. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|