Re: Custom Cocoa Component/Control
Re: Custom Cocoa Component/Control
- Subject: Re: Custom Cocoa Component/Control
- From: Mike Abdullah <email@hidden>
- Date: Tue, 20 Jan 2009 11:05:29 +0000
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 (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
_______________________________________________
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