• 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: Get|SetControlProperty() equivalent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get|SetControlProperty() equivalent


  • Subject: Re: Get|SetControlProperty() equivalent
  • From: Ken Ferry <email@hidden>
  • Date: Thu, 11 Jun 2009 09:39:22 -0700

On Thu, Jun 11, 2009 at 3:41 AM, Jo Meder <email@hidden> 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
> data with controls. I've never really used this for much, but it is very
> useful for storing a pointer to a C++ object representing the control in a
> UI framework, for example.


You could look at -[NSCell setRepresentedObject:].

-Ken


>
>
> 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'm trying to avoid setting up a map from NSViews to UI framework objects,
> but I suspect it will be inevitable. Not really a big deal, but less hassle
> to be able to associate the data directly so that would be a preferable
> solution.
>
> Regards,
>
> Jo Meder
> _______________________________________________
>
> 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
>
_______________________________________________

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

References: 
 >Get|SetControlProperty() equivalent (From: Jo Meder <email@hidden>)

  • Prev by Date: Re: Photoshop plugin with Cocoa UI problems
  • Next by Date: Weird race condition affecting bindings.
  • Previous by thread: Re: Get|SetControlProperty() equivalent
  • Next by thread: Re: Get|SetControlProperty() equivalent
  • Index(es):
    • Date
    • Thread