• 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 does an NSTextField know that it's value has changed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does an NSTextField know that it's value has changed?


  • Subject: Re: How does an NSTextField know that it's value has changed?
  • From: Brian Postow <email@hidden>
  • Date: Tue, 13 Apr 2010 17:19:04 -0400

On Apr 13, 2010, at 4:59 PM, Kyle Sluder wrote:

> On Tue, Apr 13, 2010 at 1:43 PM, Brian Postow <email@hidden> wrote:
>> I have a textfield that can either be edited by hand, or set through another control. (It's a page number, so you can jump to page 16 by typing in 16, or you can page up and down with the next/prev buttons) I have the value of the text field bound to an int page variable.
>
> You shouldn't use one control to change the value of another control.
> Instead, both controls should change some property in your controller
> layer, which in turn informs all the controls to update themselves
> from the controller. Bindings simplifies this workflow.



Ok, so I should be calling my setPage: method from my next/previous code...

Part of the problem was that the controller (where this code was) doesn't actually HAVE the page, that is in the document. So the page "property" is a ghost property, with a setPage: and a page method, but without any actual page instance variable... Thus, it didn't occur to me to set the page of the controller when I'm changing pages... When I do that, it works! thanks!


Brian Postow
Senior Software Engineer
Acordex Imaging Systems

_______________________________________________

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 does an NSTextField know that it's value has changed? (From: Brian Postow <email@hidden>)
 >Re: How does an NSTextField know that it's value has changed? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: NSNumberFormatter not working for me ?
  • Next by Date: Re: NSNumberFormatter not working for me ?
  • Previous by thread: Re: How does an NSTextField know that it's value has changed?
  • Next by thread: Re: How does an NSTextField know that it's value has changed?
  • Index(es):
    • Date
    • Thread