NSCollectionView woes
NSCollectionView woes
- Subject: NSCollectionView woes
- From: Cem <email@hidden>
- Date: Fri, 21 Nov 2008 13:47:19 -0500
I'm slowly working my way through Aaron Hillegass' Cocoa Programming
for Mac OS X and just completed the CarLot program (Chapter 11 in the
3rd edition). I decided to challenge myself and try to change the
interface to use NSCollectionView instead of the interface in the
book. In order to do this, I bound the NSCollectionView itself to my
NSArrayController (which is called Cars) with a keypath of
arrangedObjects.condition. I then created a new NSObjectController
(called 'A car'), set it to entity mode, and set the entity name to
Car (the same as what Cars has). I bound its Content Object to
Cars.selection. I then bound the GUI elements to the appropriate keys
in Car (such as car.selection.makeModel).
This, of course, didn't work. Since Car is bound to the
Cars.selection, whenever the selection changes, ALL views in my
NSCollectionView change at the same time. I then tried a number of
variants, none of which worked. What I want is for each subview in my
NSCollectionView to see the data relating to a different car, not all
reflect the same car. What am I doing wrong?
BTW, if anyone wants the current project/code, the whole thing is
about 32 KB tarballed, so I can email it anywhere anyone wants it.
Thanks,
Cem Karan
_______________________________________________
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