Something I don't understand...
Something I don't understand...
- Subject: Something I don't understand...
- From: Matt Ridley <email@hidden>
- Date: Tue, 8 May 2001 15:04:55 +0100
Hi folks,
I'm using an NSToolbar in my application's main window. The
toolbar draws and works fine. When I added the items to the
toolbar (in awakeFromNib), I gave them their labels and assigned
them an action. The method for the action is below.
One of the items does indeed have the label "Sample", but when I
click it I never get the beep. The method is definitely firing,
and I can get the label of the item (when I NSLog it, it shows
up as "Sample", just as I'd expect). Is there something very
basic I'm not understanding about how to compare the two strings?
- (void)toolbaritemclicked:(NSToolbarItem*)item {
if ([item label] == @"Sample")
NSBeep();
}
-M
--
Matt Ridley
<
http://www.mattridley.com/>