• 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
NSPopupButtonCell Oddities
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPopupButtonCell Oddities


  • Subject: NSPopupButtonCell Oddities
  • From: Daniel Todd Currie <email@hidden>
  • Date: Thu, 8 Jan 2004 15:44:34 -0800

I set an action for my NSPopupButtonCell like so:

[[[targetTable tableColumnWithIdentifier:@"archive"] dataCell] setAction:@selector(archiveSelected)];

And implement -archiveSelected like so (for testing purposes):

- (void)archiveSelected;
{
NSLog(@"%@", [[[targetTable tableColumnWithIdentifier:@"archive"] dataCell] titleOfSelectedItem]);
}

The problem is that my NSLog always gives me the title of the item that was previously selected before the action, not the one that was just selected. What useless information this is...

Is there a better way to find out what menu item was just selected?

Fondly,

Daniel Currie
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSPopupButtonCell Oddities
      • From: p3consulting <email@hidden>
  • Prev by Date: Re: Collection classes
  • Next by Date: Re: Collection classes
  • Previous by thread: Re: Thinking about shareware prices... (was a question about
  • Next by thread: Re: NSPopupButtonCell Oddities
  • Index(es):
    • Date
    • Thread