Put your collection view prototype in a separate nib, make its File's Owner a 
subclass of NSCollectionViewItem, add IBOutlets to that.

The IconCollection sample app shows how to implement collection view prototypes 
in separate nibs. Having it in the same nib as the collection view is really 
only good for trivial implementations.


----- Original Message -----
From: "Daniel Luis dos Santos" <daniel.d...@gmail.com>
To: "Cocoa-Dev List" <cocoa-dev@lists.apple.com>
Sent: Saturday, July 5, 2014 1:45:14 PM
Subject: Setting a tag on NSProgressIndicator

Hello all,

I have the item prototype of a NSCollectionView. This prototype in declared in 
a NIB file along with its view.
Now I want to display an image in this view, but while it is loading I want to 
display a circular progress indicator instead of the loaded image.

I have subclassed NSView and made it the view of the item prototype, so I can 
trigger the image loading and the replacement of the progress
indicator with the image well.

In order for the progress indicator to start animating I have to call its 
startAnimation message. But I can’t have an outlet from the progress indicator
to the item view because the NSCollectionView creates new objects for its 
items. 

So the only way I can access the subviews, is to programatically get the 
subviews. For easing that process I would like to set a tag on the progress 
indicator, but Interface builder doesn’t let me. The option appears disabled.

How can I get the progress indicator object, or any object inside the superview 
?

Thanks
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://urldefense.proofpoint.com/v1/url?u=https://lists.apple.com/mailman/options/cocoa-dev/lrucker%2540vmware.com&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yJFJhaNnTZDfFSSz1U9TSNMmxGyib3KjZGuKfIhHLxA%3D%0A&m=p1QCZjOxsY7kY8QLYdN5SaHykQApcXo%2FcRo66QiJvX4%3D%0A&s=f13c07e34c40bcb0d3e6dd72fa098b974d94a21d7f9c4c731b3c14674a0d16bc

This email sent to lruc...@vmware.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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

This email sent to arch...@mail-archive.com

Reply via email to