• 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
Getting the id of a button in a NSCollectionView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting the id of a button in a NSCollectionView


  • Subject: Getting the id of a button in a NSCollectionView
  • From: julius <email@hidden>
  • Date: Fri, 1 Aug 2008 01:14:08 +0100

Hi,
I have an NSCollectionView with an NSArrayController whose repeating NSView contains a single button.
When I create a new instance of the NSView I want to get the button's id without using the id that is passed with the IBAction message.
How do I do it?


Currently I have a MyElem class which represents and reacts to the components of the view, in this case the single button.
And MyControl which creates MyElemObject(s) and puts them into the NSArrayControllerOblect.


I just can't work out the bindings which I assume must be simple because the example posted by Kevin Hoffman of how to get data to and from an NSTextField inside an NSCollectionView turned out to be simple.
http://iphone.sys-con.com/node/453742


I have tried binding (everything in sight) to NSCollectionView or NSArrayController with representedObject.myThing in the Model Key Path.

I assume that knowing how to do this would help me do the same thing if I substituted a Custom NSView for the button, i.e. that I would be able to get the associated view's id when a MyElemObject gets created.

Thanking you in advance
Julius


http://juliuspaintings.co.uk



_______________________________________________

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


  • Prev by Date: Re: Distributed Objects "connection went invalid while waiting for a reply"
  • Next by Date: Re: compiler warning for not fully implementing protocol
  • Previous by thread: Re: Thread safety with background fetching
  • Next by thread: Doc based app - creating a document
  • Index(es):
    • Date
    • Thread