• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Retain or copy NSEvents?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Retain or copy NSEvents?
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: CIImage drawAtPoint: ...... retains image??
  • Next by Date: Bill Abt is out of the office for the holidays.
  • Previous by thread: Re: NSArrayController delete objects once removed
  • Next by thread: Re: Retain or copy NSEvents?
  • Index(es):
    • Date
    • Thread