How do I bind custom view properties to an NSCollectionViewItem?
How do I bind custom view properties to an NSCollectionViewItem?
- Subject: How do I bind custom view properties to an NSCollectionViewItem?
- From: Rick Mann <email@hidden>
- Date: Sun, 3 Jan 2010 00:11:44 -0800
In the example for NSCollectionView, they show binding text labels to the collection view item's represented object's properties. This is fine and makes sense.
But my item view contains a custom view that needs access to the represented object in the NSCollectionViewItem. Since my custom view can't be bound within IB, I need to bind it programmatically. But I can't find the right place to do this. I tried doing it in awakeFromNib, with an outlet in my custom view to the NSCollectionViewItem, but it's sometimes nil (Currently I have data for two items, and the first time awakeFromNib is called, the item outlet is set, and the second time, it's not; not sure why).
When does IB actually set the bindings specified in the nib? When can I add bind: calls and have access to both my view instance and the NSCollectionViewItem?
TIA,
Rick
_______________________________________________
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