Mike,
So I should use NSBrowser or an NSCollectionView to manage the different icons that will be in the window. But to do this, do I need to subclass the NSControl or the NSCell or both or will the NSCollectionView/NSBrowser handle the draw of the icons/images w/text?

Paul Franz


Mike Abdullah wrote:
Trying to recreate this much behaviour yourself is almost certainly a bad idea. Instead, look into NSBrowser or NSCollectionView.

Mike.

On 20 Jan 2009, at 03:16, Paul Franz wrote:

I know this is a noob question but I do not know where to look. I come for a Java background. So I know what to do there, but I look at Cocoa and I have no clue where to start since the object model is quite a bit different.

Should I create a sub-class of NSControl or do something else?

I want to have a bunch of icons (like the Finder images including the text underneath it) in a window. These would be used to traverse a hierarchy of objects (i.e. double click and it shows another list of icons). Originally, I was going to implement this all in my NSView class. But I was thinking that this does not seem to be the correct way implementing it.

I looked and found something about "Subclassing NSControl" (URL: http://developer.apple.com/documentation/Cocoa/Conceptual/ControlCell/Tasks/SubclassingNSControl.html ) but I am not sure if this is the correct approach. If so, what are the methods I need to override to make sure that the size is maintained? The control/component will need to react to mouse clicks but the NSView will be handling the dragging of the position of this control/component.

Paul Franz
_______________________________________________

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

This email sent to cocoa...@mikeabdullah.net


_______________________________________________

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

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

Reply via email to