Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting the id of a button in a NSCollectionView



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.