• 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: How to use a button to update an application with a text field value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use a button to update an application with a text field value


  • Subject: Re: How to use a button to update an application with a text field value
  • From: Tron Thomas <email@hidden>
  • Date: Tue, 05 Aug 2008 21:33:36 -0700

The way things are now, when things work right, (i.e. when objectDidBeginEditing: is not implemented) the call to commitEditing will cause the text field's action to fire which will use the binding between the text field value and the NSController's property to cause the update to occur with no outlet/action interaction needed.

For what you are suggesting, I believe the controller would require an IBOutlet instance variable that referred to the text field, so it could send the stringValue message to that control and get its result. If I'm going to take this approach, I might as well abandon the binding all together. However, the binding works really slick without having to add anything extra to the class.

I'd let to see if an elegant solution that only needs the bindings can be found for this problem.

Graham Cox wrote:
Why not just grab the field's -stringValue: after you call commitEditing? In other words pull the value from the field instead of trying to provoke it into pushing its value somewhere. Much easier, no?

hth,

Graham


On 6 Aug 2008, at 1:45 pm, Tron Thomas wrote:

What can help me to implement the functionality I'm trying to develop?





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: 
 >How to use a button to update an application with a text field value (From: Tron Thomas <email@hidden>)
 >Re: How to use a button to update an application with a text field value (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: How to use a button to update an application with a text field value
  • Next by Date: Re: Using performSelector: on super
  • Previous by thread: Re: How to use a button to update an application with a text field value
  • Next by thread: Re: How to use a button to update an application with a text field value
  • Index(es):
    • Date
    • Thread