• 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: Unanswered question..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unanswered question..


  • Subject: Re: Unanswered question..
  • From: Carlos Weber <email@hidden>
  • Date: Sun, 17 Mar 2002 16:33:51 -1000

On Wednesday, December 31, 1969, at 06:59 , Roger O'Brien wrote:

Okay guys, please help me with this simple question. I have a checkbox. Once the checkbox is clicked, it stores the state in the NSUserDefaults, and performs the action. However once the user quits and opens the application again, the application will remember the state of the checkbox. But will it still perfrom the action? I searched for this everywhere and can't find an answer, please help!

Your question is meaningless; in 1969 NSUserDefaults hadn't been written or even dreamt of. (Kidding... but you should reset your system clock; that December 31, 1969 stuff happens to me whenever I have to push the reset button on my TiBook...)

The real answer to your question is, I think, that you shouldn't rely on the UI to maintain your application's state or direct what your app does. Those are "model" or perhaps "controller" functions; the state of a checkbox is part of the "view". The Vermont Recipes tutorials, available at www.stepwise.com, provide a very clear example of how to maintain a strict separation between the application's internal state ( model ) and its user interface (view).
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Prev by Date: Example: How to Tint an Image
  • Next by Date: Re: Theory, Practice, Down-Time...
  • Previous by thread: Re: Example: How to Tint an Image
  • Next by thread: Re: Unanswered question..
  • Index(es):
    • Date
    • Thread