Questions tagged [nspopupbutton]

The NSPopUpButton class defines objects that implement the pop-up and pull-down menus of the graphical user interface.

The NSPopUpButton class defines objects that implement the pop-up and pull-down menus of the graphical user interface. An NSPopUpButton object uses an NSPopUpButtonCell () object to implement its user interface.

Inherits from NSButton : NSControl : NSView : NSResponder : NSObject.

References:

179 questions
0
votes
1 answer

Update UI element in custom Swift class

Alright, so when I first started reading about Xcode and interface builder I followed a few tutorials that made use of AppDelegate.Swift for all UI events. I'm branching out now and trying to make a custom class that still updates labels and windows…
user3185748
  • 2,478
  • 8
  • 27
  • 43
0
votes
1 answer

nspopup incorrectly logs numberOfItems at 0

I have an NSPopUpButton that is populated with an arraycontroller. When I run an nslog to ask [popup numberOfItems] it prints 0, even though when the program runs, I'm looking at 3 menu items populated in the popup. So the log must be printing…
user2638932
0
votes
1 answer

popUpButton is setEnabled:YES but doesn't allow click

my popUpButton is in a window with a group of popUpButtons. If I try to click the 2nd of 4 vertically aligned buttons then the popdown menu will not appear. If I select the 3rd or 4th then the 2nd will now be selectable. throughout my code the…
theprojectabot
  • 1,163
  • 12
  • 19
0
votes
0 answers

Getting unknown type name on using NSPopUpButton

When I try to use NSPopUpButton, I get a "Unknown type name" while building the application. I imported the Foundation.h and even after that am getting the same error. Can anyone let me know what might be the issue ?
Ashok Ambrose
  • 191
  • 3
  • 17
0
votes
2 answers

NSPopupButton menu prerender?

I have an NSPopuButton, and the first time I open it, it's slow, because it draws a lot of things. The second time and each time after that, it's very fast. What can I do so the menu is prerendered, so it opens fast even the first time? So far, I've…
pvinis
  • 4,059
  • 5
  • 39
  • 59
0
votes
1 answer

Binding NSMutableArray to NSPopUpButton and inserting new values

(This example project is here https://github.com/danieljfarrell/BindingToPopUpButtons) I'm just getting into binds, but I have an NSPopUpButton bound to a NSArrayController which is managing a content array in my AppDelegate (model) and all works…
Daniel Farrell
  • 9,316
  • 8
  • 39
  • 62
0
votes
1 answer

NSPopupButton remove all the items except one

) In a NSPopupButton I have to store different items. These can often change depending on other actions: NSArray* array = [NSArray arrayWithArray:mynewobject]; // Obviously I do not know which items will be found by mynewobject …
Mike97
  • 596
  • 5
  • 20
0
votes
1 answer

How to configure content for NSPopUpButton

I have a NSPopUpButton configured with bindings and coredata. Everything is working perfectly, however I would like to add a item that implements an action to "edit the list", like Item 1 Item 2 Item 3 Item 4 ------ Edit List.. Is this Possible to…
Cory
  • 2,302
  • 20
  • 33
0
votes
1 answer

Can a NSFormatter be used with a NSPopUpButton?

This question is similar to this one: How do I use an NSFormatter subclass with an NSPopUpButton As mentioned in that question, it seems like the 'formatter' used by the cell of a NSPopUpButton doesn't seem to work. I'm wondering if this is…
CJ.
  • 1,034
  • 1
  • 9
  • 20
0
votes
1 answer

Populating Master-Detail NSPopUp from Core Data

Here is my CoreData model. The relationship is unordered. I would like to have this model populate a pair of NSPopUp buttons like this: When the team popup is selected, the player popup should populate with the applicable players of the selected…
zzyzy
  • 973
  • 6
  • 21
0
votes
2 answers

Programmatically controlling a Cocoa Button on OSX (making it invisible and pressed)

I am trying to interface with a cocoa popup menu from an OpenGL button. The actual button needs to be in OpenGL and I cannot stick an actual Cocoa button in its place but when this button is pressed I would like for a Cocoa menu to popup just like…
Mike2012
  • 7,629
  • 15
  • 84
  • 135
0
votes
1 answer

Restoring selection to NSPopUpButton on loading a form

Please help, this is driving me mad :( I have a form as part of an OSX Cocoa app i'm writing which uses an NSPopUpButton to select the type of record you are creating/editing. I am using bindings to bind the popup button to an array controller and…
JamesB
  • 499
  • 8
  • 23
0
votes
1 answer

Binding an NSPopUpButton

OK, so here's my situation : I've got an NSDictionary, let's call it : myItem. myItem.valueNames contains the values that I want to show up in the popup myItem.values contains the values the popup must return (e.g. for valueName[0] -> value[0], and…
Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
0
votes
1 answer

Saving the selected item from a NSPopupbutton with NSUserDefaults

I've tried numerous things and cannot get it to function... [[NSUserDefaults standardUserDefaults] setObject:[my_popup_button selectedItem] forKey:@"selected"]; Does not work, got any suggestions?
Rstew
  • 585
  • 2
  • 9
  • 21
0
votes
1 answer

NSPopupbutton combining two values for Content. Perhaps similar to DisplayPattern

Id like to use a NSPopupbutton to show a list. each element in the list combine two attributes from an NSManagedObject. "firstname, userid" I'd rather not add a transient attribute, since that dirties the business logic. Is there a simple method of…
1 2 3
11
12