Re: Get|SetControlProperty() equivalent

2009-06-12 Thread Jo Meder
Hi Michael, Michael Vannorsdel wrote: Subclass NSView and use poseAsClass to replace the default implementation. You'll need to do the posing before running NSApplicationMain. You'll have to use a different approach if you're building for 64-bit. That's intriguing. I thought with the dynami

Re: Get|SetControlProperty() equivalent

2009-06-11 Thread Peter N Lewis
On 11/06/2009, at 18:41 , Jo Meder wrote: It would be great to be able to do this for NSViews but I haven't been able to find any equivalent. Are there any ingenious ways that you might be aware of so I could bolt this on to NSView? I have yet to find a good solution to this. It would be fa

Re: Get|SetControlProperty() equivalent

2009-06-11 Thread Ken Ferry
On Thu, Jun 11, 2009 at 3:41 AM, Jo Meder wrote: > Hi, > > I'm pretty sure I know the answer to this question, but I'll ask it anyway > :-)... > > Is there a Cocoa equivalent to Carbon's Get|SetControlProperty() family of > functions? For those not familiar these functions let you associate user

Re: Get|SetControlProperty() equivalent

2009-06-11 Thread Graham Cox
On 11/06/2009, at 11:43 PM, Michael Vannorsdel wrote: Subclass NSView and use poseAsClass to replace the default implementation. You'll need to do the posing before running NSApplicationMain. You'll have to use a different approach if you're building for 64-bit. Note that poseAsClass

Re: Get|SetControlProperty() equivalent

2009-06-11 Thread Michael Vannorsdel
Subclass NSView and use poseAsClass to replace the default implementation. You'll need to do the posing before running NSApplicationMain. You'll have to use a different approach if you're building for 64-bit. On Jun 11, 2009, at 7:25 AM, Jo Meder wrote: Hi Graham, On 11/06/2009, at 11

Re: Get|SetControlProperty() equivalent

2009-06-11 Thread Graham Cox
On 11/06/2009, at 11:25 PM, Jo Meder wrote: It's not really so simple, because I'd have to subclass all the views/controls I use, which is many of the UI elements available, and that means I have many disparate classes implementing the same functionality. Of course I then need to repeat th

Re: Get|SetControlProperty() equivalent

2009-06-11 Thread Jo Meder
Hi Graham, On 11/06/2009, at 11:50 PM, Graham Cox wrote: The carbon mechanism exists because in classical procedural code, you can't subclass an "object" because there is no formal "object" to subclass. Therefore storage mechanisms have to be provided to hang extra stuff on. It's still j

Re: Get|SetControlProperty() equivalent

2009-06-11 Thread Graham Cox
On 11/06/2009, at 8:41 PM, Jo Meder wrote: I'm pretty sure I know the answer to this question, but I'll ask it anyway :-)... Is there a Cocoa equivalent to Carbon's Get|SetControlProperty() family of functions? For those not familiar these functions let you associate user data with contr

Re: Get|SetControlProperty() equivalent

2009-06-11 Thread Michael Vannorsdel
Generally you subclass the control and implement whatever data association you want. On Jun 11, 2009, at 4:41 AM, Jo Meder wrote: I'm pretty sure I know the answer to this question, but I'll ask it anyway :-)... Is there a Cocoa equivalent to Carbon's Get|SetControlProperty() family of

Get|SetControlProperty() equivalent

2009-06-11 Thread Jo Meder
Hi, I'm pretty sure I know the answer to this question, but I'll ask it anyway :-)... Is there a Cocoa equivalent to Carbon's Get|SetControlProperty() family of functions? For those not familiar these functions let you associate user data with controls. I've never really used this for m