nspopupbutton

NSPopupButton in view based NSTableView: getting bindings to work

妖精的绣舞 提交于 2019-12-03 14:38:25
问题 Problem Description I'm trying to achieve something that should be simple and fairly common: having a bindings populated NSPopupButton inside bindings populated NSTableView. Apple describes this for a cell based table in the their documentation Implementing To-One Relationships Using Pop-Up Menus and it looks like this: I can't get this to work for a view based table. The "Author" popup won't populate itself no matter what I do. I have two array controllers, one for the items in the table (

NSPopupButton in view based NSTableView: getting bindings to work

懵懂的女人 提交于 2019-12-03 03:26:17
Problem Description I'm trying to achieve something that should be simple and fairly common: having a bindings populated NSPopupButton inside bindings populated NSTableView. Apple describes this for a cell based table in the their documentation Implementing To-One Relationships Using Pop-Up Menus and it looks like this: I can't get this to work for a view based table. The "Author" popup won't populate itself no matter what I do. I have two array controllers, one for the items in the table ( Items ) and one for the authors ( Authors ), both associated with the respective entities in my core

NSPopUpButton, NSComboBox similar menu

Deadly 提交于 2019-12-02 10:13:29
I'm trying to create a menu with a drop down menu with a custom background for every cell. First i tried to adapt NSPopUpButton but i couldn't find a way to change the cells background image. Using setImage: would slide the text to the right of the background. Next I stopped at NSComboBox but i couldn't find a way to change the arrow button. Can someone please help with and idea? Next thing would be to create a custom controller but i would like to use something already done. To customise the arrow button in NSComboBox, you need to create a subclass of NSComboBoxCell and set your combo box to

NSPopUpButton + Bindings + Show All Option

扶醉桌前 提交于 2019-11-30 23:31:19
I'm trying to develop a NSPopUpButton that will serve as a filter to some datasource, let's say a NSArrayController that fills a table. I can bind the NSArrayController from the menu to the selection keypath so the data is properly filtered, no problem with that. Tricky part is, I want the content of this NSPopUpButton to rely on an NSArrayController using bindings, but I'd like to add a "Show All" menu item, or at least some item that doesn't come from the Core Data and performs some special action other than filtering the table using bindings and core data. I'm trying to perform something