• 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 to Access NSArrayController Contents in NSCollectionView Views?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to Access NSArrayController Contents in NSCollectionView Views?


  • Subject: How to Access NSArrayController Contents in NSCollectionView Views?
  • From: Bryan Marty <email@hidden>
  • Date: Wed, 10 Jun 2009 13:58:08 -0400

I am currently have trouble trying to understand how to access objects in an NSArrayController in conjunction with a NSCollectionView.

I have a class entitled: "VCMovieObjects", which contains information on a specific video clip. These objects are loaded into an NSArrayController, which is bound to a NSCollectionView. The NSCollectionView loads up my own subclassed NSViews (VCMovieContainer) into its contents for each object in the NSArrayController. I know I can bind various labels on my subclassed NSView to show the properties stored in my VCMovieObjects, but I want my VCMovieContainer to be able to access the appropriate VCMovieObject itself in the code, that way I can access all the data I need from it and use it appropriately when drawing the contents of the VCMovieContainer that correlates to that specific VCMovieObject.

I am not sure about how to go about doing this in the correct way. I consider trying to bind an Object to the NSArrayController, and then creating an Outlet to that object from my custom NSView, but I don't know if it will maintain the correct reference to the right object that coressponds with the particular view. When I tried it, I just got a null when trying to access data. I want to avoid subclassing NSArrayController if possible. Any pointers would be appreciated. Thank you.
_______________________________________________


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: Drop dowm status menubar item while hovering cursor over it
  • Next by Date: SQLite -- same DB, different machines -> different results
  • Previous by thread: Re: Drop dowm status menubar item while hovering cursor over it
  • Next by thread: SQLite -- same DB, different machines -> different results
  • Index(es):
    • Date
    • Thread