• 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
Attempt to nest an NSCollectionView fails.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Attempt to nest an NSCollectionView fails.


  • Subject: Attempt to nest an NSCollectionView fails.
  • From: Brian Krisler <email@hidden>
  • Date: Mon, 22 Mar 2010 23:31:31 -0400

Hi,

I am trying to nest an NSCollectionView inside an existing collection view and am not having much luck.  The example I am building runs without issue, however the nested values do not appear.

I currently have two model classes:

@interface BlockModel : NSObject {
	NSString *blockTitle;
	NSMutableArray *blockItems;
}
@property (readwrite, retain) NSString *blockTitle;
@property (readwrite, retain) NSMutableArray *blockItems;
@end

and

@interface BlockItem : NSObject {
	NSString *itemName;
	NSString *itemDescription;
}
@property (readwrite, retain) NSString *itemName;
@property (readwrite, retain) NSString *itemDescription;
@end

In my delegate, I have an NSMutableArray of blockModels.

Then in Interface Builder, I have an NSCollection view with a label and a nested NSCollection view.  The label contains the BlockModel.blockTitle (which displays correctly).

To get content into the nested view, I have an Array Controller with the Content Array bound to the Collection View Item from the parent and a model Key Path of: representedObject.blockItems

My nested collection view has its content bound to my Array Controller arrangedObjects. And my array controller is configured to be an object controller with the keys: itemName and itemDescription. I then have two labels in my nested collection view bound to the nested collection view item representedObject.itemName and representedObject.itemDescription.

When I execute my code, I can see a few blocks with the proper titles, however the nest view is completely empty.

Is there a step that I am missing?

Thanks for any help.

Brian
_______________________________________________

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: Attempt to nest an NSCollectionView fails.
      • From: Kevin Perry <email@hidden>
  • Prev by Date: Details and the concepts related to the Nib Window
  • Next by Date: Re: Details and the concepts related to the Nib Window
  • Previous by thread: Re: Details and the concepts related to the Nib Window
  • Next by thread: Re: Attempt to nest an NSCollectionView fails.
  • Index(es):
    • Date
    • Thread