How to with NSCollectionView?
How to with NSCollectionView?
- Subject: How to with NSCollectionView?
- From: malcom <email@hidden>
- Date: Wed, 23 Jan 2008 10:40:09 +0100
Hello,
I would to use NSCollectionView class in order to display a matrix of
custom NSView. I've looked at the docs but... there is not any
documentation about it at this time. So looking around I wrote this
code (yeah it does not works):
[collectionView setItemPrototype: [[NSCollectionViewItem alloc] init]];
// i will create my collecyion view item to instert
NSCollectionViewItem *item = [[NSCollectionViewItem alloc] init];
// can represent object a custom class? need to respond to a protocol?
// at this time it's only a empty class without methods
MCTaskItem *repObject = [[MCTaskItem alloc] init]
[item setRepresentedObject: repObj];
// set the NSView to object
NSView *v = [[[ProgressTaskView alloc] init] view];
[item setView: v];
// add it
[collectionView setContent: [NSArray arrayWithObject: item ]];
MCTaskItem should be a class with some custom methods but I'm not use
I need to implement a sort of protocol in order to support
NSCollectionView. Anyone can point me to the right wau?
(ProgressTaskView loads only a view from within a nib)
Malcom
_______________________________________________
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