Skip to content

Instantly share code, notes, and snippets.

@saikat
Created November 17, 2009 23:54
Show Gist options
  • Save saikat/237397 to your computer and use it in GitHub Desktop.
Save saikat/237397 to your computer and use it in GitHub Desktop.
@import <AppKit/CPToolbar.j>
@implementation CPToolbar(ToolbarItemFetching)
{ }
- (CPToolbarItem)itemForIdentifier:(CPString)anIdentifier
{
var count = [_items count];
for (var i = 0; i < count; ++i)
if (_items[i]._itemIdentifier === anIdentifier)
return _items[i];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment