Retain or copy NSEvents?
Retain or copy NSEvents?
- Subject: Retain or copy NSEvents?
- From: David Hoerl <email@hidden>
- Date: Sat, 15 Dec 2007 08:50:35 -0500
I have some classic drag and drop code, where I save the mouse down
event, and then later provide this event to dragImage when the drag
and drop begins.
My original code simply retained the mouseDown event. A month or so
ago I was reading some Apple document that said the system sometimes
"reuses" an event, and thus the proper way to retain an event is to
make a copy of it. I modified my code and made a simple note that
Apple advised doing this. [I also recall going to the online NSEvent
document and making a comment that this fact should be in the NSEvent
documentation, and sited the reference.]
Of course, now that I was asked for a reference on this, I cannot for
the life of me find it. I tried all the Event and NSEvent
documentation, NSRunLoop, and Drag and Drop.
Does anyone out there recall where this is documented? If so please
speak up! Thanks,
David
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden