Re: NSToolbar Design
Re: NSToolbar Design
- Subject: Re: NSToolbar Design
- From: Eric Peyton <email@hidden>
- Date: Tue, 5 Mar 2002 17:47:42 -0600
On Tuesday, March 5, 2002, at 05:16 PM, Matthew Cox wrote:
I am curious to know why Apple did not implement NSToolbar and
NSToolbarItem as subclasses of NSView. This would seem to allow
developers to specialize the functionality of toolbars, as well as
modify event behavior. Since neither of those two classes inherit
NSView, it would seem that the window displaying them draws the
toolbars. Is this so?
If toolbars inherited classes like NSView and NSResponder, the toolbar
itself could be modified to allow, for example, them to act as
destinations for drag & drop. Or they could be graphically modified to
insert a silk screened image onto the piping.
So, why is NSToolbar implemented as a direct descendent of NSObject,
and is there a workaround to specialize the event handling and
appearance of toolbars?
I can't address why Apple decided to do this (though i do agree with the
design), but I can address one point that you put in here ...
It is very easy to create toolbar items that accept drag and drop.
Creating a "blank area" that responds to drops and dynamically creates a
new toolbar item of a "drop" type is just as easy. I have done this in
a few apps and have had no problems with it.
Eric
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.