• 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 with NSCollectionView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to with NSCollectionView?
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: [[NSView animator] setHidden:YES] doesn't fade?
  • Next by Date: Re: Understanding the inner workings: getting to know how functions are called
  • Previous by thread: Sortable Table Column with Custom Appearance
  • Next by thread: Re: How to with NSCollectionView?
  • Index(es):
    • Date
    • Thread