tag != pointer under GC (was Re: SetControlReference equivalent in NSControl?)

2008-06-25 Thread Chris Hanson
On Jun 25, 2008, at 9:39 PM, Graham Cox wrote: On 26 Jun 2008, at 6:01 am, Kevin Elliott wrote: There is no reason to subclass his control to attach an int value (or more generally to track which instance a particular control is). See NSControl tag/setTag. They allow you to do exactly wha

Re: SetControlReference equivalent in NSControl?

2008-06-25 Thread Graham Cox
On 26 Jun 2008, at 6:01 am, Kevin Elliott wrote: There is no reason to subclass his control to attach an int value (or more generally to track which instance a particular control is). See NSControl tag/setTag. They allow you to do exactly what he wants. Well, not quite - tags store int

Re: SetControlReference equivalent in NSControl?

2008-06-25 Thread Kevin Elliott
On Jun 24, 2008, at 3:45 PM, Graham Cox wrote: Bear in mind that the typical purpose of a ControlRef in Carbon is to keep track of an associated wrapper object (or other extended data). In Cocoa, NSControl already is that object. The way to extend an object is to subclass it and add whatev

Re: SetControlReference equivalent in NSControl?

2008-06-24 Thread Graham Cox
Bear in mind that the typical purpose of a ControlRef in Carbon is to keep track of an associated wrapper object (or other extended data). In Cocoa, NSControl already is that object. The way to extend an object is to subclass it and add whatever ivars you need. So there would appear to be n

Re: SetControlReference equivalent in NSControl?

2008-06-24 Thread Kyle Sluder
On Tue, Jun 24, 2008 at 2:53 PM, <[EMAIL PROTECTED]> wrote: > In Carbon you can tie a 32 bit value to a control with SetControlReference. > Is there an equivalent method in NSControl? I looked around in the header > files but couldn't find anything (NSControl, NSView, NSResponder, NSObject). Wh

SetControlReference equivalent in NSControl?

2008-06-24 Thread jeffs87
Hi, In Carbon you can tie a 32 bit value to a control with SetControlReference. Is there an equivalent method in NSControl? I looked around in the header files but couldn't find anything (NSControl, NSView, NSResponder, NSObject). thanks Jeff __