Re: widget destruction [message #18948] |
Wed, 16 February 2000 00:00 |
Steven Chetelat (CS)
Messages: 11 Registered: February 2000
|
Junior Member |
|
|
On Tue, 15 Feb 2000, David Fanning wrote:
> I think you're throwing us a red-herring here, Steve.
> I'd like to see the *entire* event handler code, because
> I'm pretty sure this is NOT what is happening. :-)
>
> Usually, when you get an error like this it means you
> took the dataim value out in an event handler with a No_Copy,
> but you forgot to put it back in before you leave the
> event handler. This causes the *second* event you generate
> to give you this kind of error.
Yeah, I'd figured this out already.
> Having DESTROYs in an event handler is an excellent way
> to generate this kind of error, too. My guess is that
> when you kill that widget, somebody else is looking
> for dataim and not finding it in the user value of
> ev.handler. (Since you took it out with NO_COPY, the
> user value is by definition undefined then.) Perhaps
> a Cleanup routine?
Yes, I'd forgotten that I had added a cleanup to that particular widget,
because (despite an incredibly intuitive interface) people kept dismissing
the window improperly :-}.
Thanks for the help. Thanks also to Jim Pendleton, who answered by
e-mail.
K-Bye,
STEVE! (chetelat@csee.usf.edu)(steve@moffitt.usf.edu)
|
|
|