• 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
How do I bind custom view properties to an NSCollectionViewItem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How do I bind custom view properties to an NSCollectionViewItem?
      • From: Markus Spoettl <email@hidden>
  • Prev by Date: Re: [iPhone] how do I stop a running thread
  • Next by Date: Re: NSBezierPath linewidth not correct
  • Previous by thread: Re: Table views in combined tab/nav interface
  • Next by thread: Re: How do I bind custom view properties to an NSCollectionViewItem?
  • Index(es):
    • Date
    • Thread