• 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
Re: Draggable buttons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Draggable buttons


  • Subject: Re: Draggable buttons
  • From: "Erik M. Buck" <email@hidden>
  • Date: Sat, 2 Feb 2002 12:02:16 -0600
  • Organization: EMB & Assocites Inc.

> _mouseDownEvent = [theEvent retain];

Try _mouseDownEvent = [theEvent copy];

It is not enough to retain an event. NSEvent instances are reused so the
data may change behind your back.
Yes, this is documented.

Also, try _myMouseDownEvent or use some other prefix because Apple reserves
the name space for all variables that start with _ and do not have a prefix.
In this particular case, I believe that NSControl already has an instance
variable named _mouseDownEvent.


  • Follow-Ups:
    • _iVar prefixes (was Re: Draggable buttons)
      • From: Jim Correia <email@hidden>
References: 
 >Draggable buttons (From: Ben Chess <email@hidden>)

  • Prev by Date: Draggable buttons
  • Next by Date: _iVar prefixes (was Re: Draggable buttons)
  • Previous by thread: Draggable buttons
  • Next by thread: _iVar prefixes (was Re: Draggable buttons)
  • Index(es):
    • Date
    • Thread