• 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
Problem using NSPopUpButtonCell in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem using NSPopUpButtonCell in NSTableView


  • Subject: Problem using NSPopUpButtonCell in NSTableView
  • From: Glenn Zelniker <email@hidden>
  • Date: Thu, 18 May 2006 16:49:17 -0400

I have an NSTableView that uses an NSPopUpButtonCell in one of its columns. I used IB to set the column's data cell to a popUpButtonCell, dragged an NSMenu into my AppController's nib, attached the popup cell's menu outlet to the menu, attached the menu's delegate outlet to the AppController, etc. I use the - menuNeedsUpdate delegate method to dynamically create the menu items for each popup cell, which works fine -- each popup button in the table shows the correct menu.

I'm also aware of the bug with the individual menus "forgetting" about their delegate outlets, so I use the tableView:willDisplayCell.... method to "remind" the cell's menu that the app controller is the delegate for the menu.

Here's where the trouble begins. I can't seem to get the menu to accept any selection. I tried many different approaches, but nothing works. I went so far as to set my app controller as an observer for NSMenuWillSendActionNotification. I can indeed verify that the menu I'm expecting is being sent with the notification by looking at the - object of the notification. But when I look at the menuItem that's sent in the notification's -userInfo dictionary, the menuItem is (null). In other words, it just doesn't seem like any selection is occurring.

I've been beating my head against the wall all day trying to figure this out, but I'm not getting anywhere. Any help would be appreciated.

Glenn Zelniker
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Problem using custom entity class with subclasses NSArrayController
  • Next by Date: Re: Problem using custom entity class with subclasses NSArrayController
  • Previous by thread: Re: Problem using custom entity class with subclasses NSArrayController
  • Next by thread: Pinning an object to the menu bar
  • Index(es):
    • Date
    • Thread