• 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
Re: using NSPopUpButtonCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using NSPopUpButtonCell


  • Subject: Re: using NSPopUpButtonCell
  • From: Stéphane Sudre <email@hidden>
  • Date: Sat, 19 Nov 2005 10:39:56 +0100


On samedi, novembre 19, 2005, at 05:25 AM, Andrew Bush wrote:

Hi all,

is there any example code showing how to use this?

I have a simple tableview that  would like to have a popup in each row.

I have added NSPopUpButtonCell to the relevant column.

Ive created an instance of NSMenu

I have set the 'menu' outlet of the NSPopUpButtonCell column to this menu.

I have set the 'delegate' outlet of the NSMenu to a controller.

I have implemented - (void)menuNeedsUpdate:(NSMenu *)menu in this controller

Another, separate, NSPopupButton uses this with no problems whenever it is clicked on.

The problem I have is that the NSPopUpButtonCell never actually calls menuNeedsUpdate on its delegate.

Is this a known bug? have I skipped a step?

What is the menuNeedsUpdate: method supposed to do? I can't find it in the documentation. Is it your action method for the menu?


If anyone knows of some sample code showing this working I would love to see it.

If the idea is to know when a new menu item has been selected and reflecting this change to the popupbutton cell in the table, IIRC, here is how you can proceed:


- select the proper menu item in the -tableView:willDisplayCell:forTableColumn:row:; method.

- get the selected item index in the - tableView:setObjectValue:forTableColumn:row: method.


_______________________________________________ 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
References: 
 >using NSPopUpButtonCell (From: Andrew Bush <email@hidden>)

  • Prev by Date: Re: addSubviews: How can I populate the first tier of the Container View only?
  • Next by Date: Re: URL loading system not threadsafe?
  • Previous by thread: using NSPopUpButtonCell
  • Next by thread: adding Foundation framework to a Carbon application
  • Index(es):
    • Date
    • Thread