Re: Subclassing NSToolbar is *fully* really good
Re: Subclassing NSToolbar is *fully* really good
- Subject: Re: Subclassing NSToolbar is *fully* really good
- From: John Lombardo <email@hidden>
- Date: Tue, 4 May 2004 12:20:51 +0800
Thank you Louis and Chris for your contributions. Whilst neither fixed
the problem, they both put me on the right track. I figured that if it
wanted a distinct copy of the NSToolbarItem, I would just use the
(id)copy method to make a deep copy.
- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar
itemForItemIdentifier:(NSString *)itemIdentifier
willBeInsertedIntoToolbar:(BOOL)flag
{
return [[toolbarItemDictionary objectForKey:itemIdentifier] copy];
}
Behold! Workage! Who would have thought that after buggerizing around
for days, the answer would come in the form of a four letter word.
Thanks again for the help, guys. I wouldn't have thought to look where
I did without your input.
Cheers,
john
P.S.
Louis wrote:
Delegate methods should be implemented in delegates :)
Meh! I hate having the same code doing the same thing in every window
controlling subclass. It's just so... un-O-O. ;)
_______________________________________________
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.