• 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
Why use a NSController (was Re: Cocoa bindings one- or bi-directional)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why use a NSController (was Re: Cocoa bindings one- or bi-directional)


  • Subject: Why use a NSController (was Re: Cocoa bindings one- or bi-directional)
  • From: Tim Lucas <email@hidden>
  • Date: Tue, 31 May 2005 16:37:10 +1000

On 28/05/2005, at 2:10 AM, Jonathon Mah wrote:
Say you have an app that does some calculations based on some values in text fields. These calculations take a few seconds. When a user goes into a field, changes the value, and commits editing (by hitting return, tabbing out, or clicking somewhere else) the rest of the document recalculates.

The user is in one of the text fields and has typed a value, but hasn't committed editing in any way. She hits Cmd-S. What should happen here is that the value be committed, the document recalculated, and finally saved, with the focus remaining in the text field. NSController and friends takes care of this committing.

Now again, the user is in another text field and has typed a value, but hasn't committed. She then decides to revert the document or quit the app. Here the editing should be discarded immediately with no recalculation (as it takes time, and the results would just be thrown out anyway). Again, NSController takes care of this situation.

Thanks Jon, much appreciated. I figured it was as much, but didn't know the details.


Hats off to the Cocoa and NeXT devs for allowing me to write fairly complex cocoa apps for the past year without delving into the details of NSEditor and friends. It's always a case of learn it as you need it...

- tim lucas

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Cocoa bindings one- or bi-directional (From: Zdzislaw Losvik <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: Kay Roepke <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: mmalcolm crawford <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: mmalcolm crawford <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: Scott Anguish <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: mmalcolm crawford <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: Scott Anguish <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: Tim Lucas <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: Tim Lucas <email@hidden>)
 >Re: Cocoa bindings one- or bi-directional (From: Jonathon Mah <email@hidden>)

  • Prev by Date: NSTableView row dragging and NSSliderCell
  • Next by Date: ScreenSaverView/Opaque/Update woes....
  • Previous by thread: Re: Cocoa bindings one- or bi-directional
  • Next by thread: Re: Cocoa bindings one- or bi-directional
  • Index(es):
    • Date
    • Thread