Re: Draggable buttons
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.