Hi Everyone,

I can't seem to get an NSCollectionView to render an of the 
NSCollectionViewItems' NSViews.

I have an NSCollectionView that is bound to an NSArrayController's 
arrangedObjects.
The NSCollectionViewItem is set up as a template, and also has its Outlet 
attached to an NSView.
For fun I added a text label as well as an image from the Media Library, as a 
placeholder image on the NSView.
(It helps to have something to look at!)

I don't have anything bound to the NSView at all.
I haven't subclassed anything either. These are the standard objects within IB.

My App inserts objects into an array using the NSArrayController as needed.
However, as this happens, *nothing* is rendered at all. As a test, I have 
subclassed the NSView, and checked the drawRect method.

Nothing.

I enabled selectable in my NSCollectionView and checked for a hitTest method in 
my view. I can blindly click inside the NSCollectionView to the approximate 
location of the view, and see an hitTest response. Strange! So I know that my 
NSView is being recognized by my NSCollectionView, as hitTest is being called. 
But drawRect isn't happening.

Can anyone hazard a guess at what I am doing wrong?

Some notes..
This interface is to drive a network device. As such, the UI doesn't actually 
populate with anything until it is discovered over the network.
As a matter of fact, the array that the NSArrayController uses doesn't even 
exit during the "awakeFromNib" process. The actual array is created as soon as 
the device comes online, and is attached using a binding. Perhaps I need to 
send some sort of message to the NSCollectionView after the new array is bound?

Thanks!

bob.

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to