• 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: Getting the users typed text in a NSComboBox textfield
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the users typed text in a NSComboBox textfield


  • Subject: Re: Getting the users typed text in a NSComboBox textfield
  • From: Mike Blaguszewski <email@hidden>
  • Date: Mon, 18 Dec 2006 12:55:21 -0500

On Dec 18, 2006, at 6:30 AM, Paul Harvey wrote:

I am using - (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor to detect when the user types in the text field of the NSComboBox and this works great. However, I have been unable to actually extract the contents of the textbox itself!

Calling [fieldEditor string] should work. Or you can use -stringValue and -setStringValue: on the NSComboBox itself, since it's a subclass of NSTextField. Also, be sure to heed your compiler's warnings, rather than counting on runtime errors like "selector not recognized".


--
Mike Blaguszewski / Cocoa Hacker / Ambrosia Software, Inc.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Getting the users typed text in a NSComboBox textfield (From: Paul Harvey <email@hidden>)

  • Prev by Date: Undo with table view and array controller
  • Next by Date: Re: Using bindings to make an NSPopupButton to assign an array filter predicate
  • Previous by thread: Getting the users typed text in a NSComboBox textfield
  • Next by thread: Retain the expanded items of NSOutlineView on reload
  • Index(es):
    • Date
    • Thread