• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Something I don't understand...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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/>


  • Follow-Ups:
    • Re: Something I don't understand...
      • From: rsharp <email@hidden>
  • Prev by Date: continu to search info (Socket)
  • Next by Date: Re: Something I don't understand...
  • Previous by thread: Re: continu to search info (Socket)
  • Next by thread: Re: Something I don't understand...
  • Index(es):
    • Date
    • Thread