Skip to content

Instantly share code, notes, and snippets.

@floriankrueger
Created August 4, 2011 13:56
Show Gist options
  • Save floriankrueger/1125202 to your computer and use it in GitHub Desktop.
Save floriankrueger/1125202 to your computer and use it in GitHub Desktop.
CPViewCollectionItem from Cib Problem
..
// --- create the collection item (prototype)
var myCollectionItem = [[CPCollectionViewItem alloc] initWithCibName:@"MyCollectionCell" bundle:[CPBundle mainBundle]];
[myCollection setItemPrototype:myCollectionItem]; //set the item prototype
..
4322011-08-04 15:46:29.955 Cappuccino [info]: loaded
CPInternalInconsistencyException: View for <CPCollectionViewItem 0x0050f9> could not be loaded from Cib or no view specified. Override loadView to load the view manually.
@implementation MyCollectionCell : CPView
{
@outlet CPImageView postImage;
@outlet CPTextField labelTitle;
..
}
- (void)awakeFromCib
{
CPLog("loaded");
}
- (void)setRepresentedObject:(MyEntry)myItem
{
[labelTitle setStringValue:[floatItem title]];
..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment