Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 21, 2012, 12:02 PM   #1
jivaro
macrumors newbie
 
Join Date: Apr 2012
Location: Cornella de Llobregat (Spain)
NSComboBox programmatically pop-up method

Is there any way of programmatically displaying a comboBox pop-up ?
jivaro is offline   0 Reply With Quote
Old Apr 21, 2012, 03:16 PM   #2
Red Menace
macrumors regular
 
Join Date: May 2011
Location: Littleton, Colorado, USA
Yes.
__________________
MacBook Pro / OS X Mavericks (10.9.4) / Xcode 5.1.1 / RubyMotion FTW
Red Menace is offline   0 Reply With Quote
Old Apr 21, 2012, 04:17 PM   #3
jivaro
Thread Starter
macrumors newbie
 
Join Date: Apr 2012
Location: Cornella de Llobregat (Spain)
Quote:
Originally Posted by Red Menace View Post
Yes.
This is a GREAT new. Now, what is the way of doing it ??
jivaro is offline   0 Reply With Quote
Old Apr 21, 2012, 04:54 PM   #4
Red Menace
macrumors regular
 
Join Date: May 2011
Location: Littleton, Colorado, USA
Usually you would initialize the control, set some attributes, and add it to your window's content view, but without at least a little bit of help such as maybe OS and Xcode versions, language, exactly what you are wanting to do and what you have done so far, etc, you aren't going to get much help.
__________________
MacBook Pro / OS X Mavericks (10.9.4) / Xcode 5.1.1 / RubyMotion FTW
Red Menace is offline   0 Reply With Quote
Old Apr 22, 2012, 03:42 AM   #5
jivaro
Thread Starter
macrumors newbie
 
Join Date: Apr 2012
Location: Cornella de Llobregat (Spain)
Quote:
Originally Posted by Red Menace View Post
Usually you would initialize the control, set some attributes, and add it to your window's content view, but without at least a little bit of help such as maybe OS and Xcode versions, language, exactly what you are wanting to do and what you have done so far, etc, you aren't going to get much help.
I'm trying to develop an application for Mac OS X. I'm running a G5 with Mac OS X version 10.5.8 and XCode 3.1.4. I bought this Mac 2nd hand for 200 €. After decades of PCs this is my first Mac, I am loving it and I plan to buy myself a new Mac for my next anniversary.

Now, going to my problem, I have implemented a piece of code allowing to (add and) remove items from a ComboBox:
Code:
	
	NSString *comboEntry = [outletComboBoxCell stringValue];    // get comboBox entry
	[outletComboBoxCell removeItemWithObjectValue:comboEntry];  // delete comboBox entry
	[outletComboBoxCell setStringValue:@""];                    // set comboBoxCell to nul
and I would like that after deleting an item from the ComboBox list, the pop-up list was displayed to show the rest of elements still there.

I have googled the issue, and found nothing so far, only a reference to a popUp method that is not documented and I have not been able to make it work.

I'm sure that there must be some solution to this issue, but I am not able to find it.

Last edited by maflynn; Apr 22, 2012 at 02:21 PM. Reason: code tags added
jivaro is offline   0 Reply With Quote
Old Apr 22, 2012, 07:28 AM   #6
Sydde
macrumors 68000
 
Sydde's Avatar
 
Join Date: Aug 2009
Can you explain why a combo box is the best choice for what you are trying to accomplish? To me, it sounds like a rather awkward tool for the kind of thing you are describing (editing a list).
__________________
You got to be a spirit. You can't be no ghost.
Sydde is offline   0 Reply With Quote
Old Apr 22, 2012, 11:11 AM   #7
jivaro
Thread Starter
macrumors newbie
 
Join Date: Apr 2012
Location: Cornella de Llobregat (Spain)
Quote:
Originally Posted by Sydde View Post
Can you explain why a combo box is the best choice for what you are trying to accomplish? To me, it sounds like a rather awkward tool for the kind of thing you are describing (editing a list).
Its hard to realize a simpler option: 3 lines of code and it's done .....
jivaro is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Pop Up Ads in Safari with pop up blocker on... befrank4444 Mac Applications and Mac App Store 1 Dec 8, 2013 04:00 AM
Add Item to Dock Programmatically BobRon Mac Programming 1 Sep 22, 2013 04:08 AM
Class Method -> Function -> Instance Method? Blakeasd Mac Programming 11 Jun 19, 2013 02:53 AM
Programmatically sending messages Mvkoe iPhone/iPad Programming 1 Jan 18, 2013 06:13 AM
Is there a way to programmatically change the language being used? NukemHill iPhone/iPad Programming 0 Dec 12, 2012 03:22 PM

Forum Jump

All times are GMT -5. The time now is 12:39 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC