FROM : Karl Moskowski
DATE : Mon Mar 24 15:22:52 2008
If you're creating a toolbar for which all items should be selectable,
instead of binding each of the toolbar's items separately or iterating
over them all and building an array, you can just use KVC to get an
array of all items' identifiers.
// NSToolbar delegate method
- (NSArray *) toolbarSelectableItemIdentifiers:(NSToolbar*) toolbar {
return [[myToolbar items] valueForKey:@"itemIdentifier"];
}
(For my prefs window toolbar, this is the only delegate method I've
implemented.)
----
Karl Moskowski <<email_removed>>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>
DATE : Mon Mar 24 15:22:52 2008
If you're creating a toolbar for which all items should be selectable,
instead of binding each of the toolbar's items separately or iterating
over them all and building an array, you can just use KVC to get an
array of all items' identifiers.
// NSToolbar delegate method
- (NSArray *) toolbarSelectableItemIdentifiers:(NSToolbar*) toolbar {
return [[myToolbar items] valueForKey:@"itemIdentifier"];
}
(For my prefs window toolbar, this is the only delegate method I've
implemented.)
----
Karl Moskowski <<email_removed>>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

