Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the users typed text in a NSComboBox textfield



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.