Re: Crash on [event locationInWindow]
Re: Crash on [event locationInWindow]
- Subject: Re: Crash on [event locationInWindow]
- From: "Sean McBride" <email@hidden>
- Date: Mon, 22 Nov 2004 23:32:16 -0500
Colin O'Connor (email@hidden) on Sun, Nov 21, 2004 23:07 said:
>I have 2 custom NSImageViews in which I define mouseDragged:(NSEvent
>*)event. I use [event locationInWindow] to get the location of the mouse
>event in both cases. However, in one of my custom classes, this works fine,
>but in the other, the app crashes as soon as I call [event
>locationInWindow]. In what circumstances would this method cause my app to
>crash?
Maybe depending on when you call it... I just read this in Anguish et
al's book "The NSEvent passed to each event-processing method is only
valid within that method's implementation. The Cocoa frameworks reserve
the right to reuse existing NSEvent instances or otherwise tamper with
their contents"
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Mac Software Designer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden