• 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: The Problems with NSController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Problems with NSController


  • Subject: Re: The Problems with NSController
  • From: David Remahl <email@hidden>
  • Date: Sun, 26 Oct 2003 16:49:17 +0100

On 26 okt 2003, at 16.37, Andreas Mayer wrote:

Am Sonntag, 26.10.03 um 15:42 Uhr schrieb Aaron Hillegass:

5. It relies on unsavory hacks to the runtime system. For a controller to know about changes to a model object, your accessor methods need to notify it of the change. In EOF, the developer added a call to [self willChange] to each set method in his model objects. NSController (which doesn't trust you to do this) replaces your class with a secret subclass that does the "right" thing.

I just wondered about this point when reading the documentation.

Too bad. Sounded like a great concept.

It should be noted, though, that this behaviour is optional. You can choose to disable automatic "KV Observer Notification" (+[NSObject automaticallyNotifiesObserversForKey:]), and then you have to call -willChangeValueForKey: to give manual notification of value changes.

I have not spent enough time actually working with NSController to have formed an opinion on wether it is well designed or not.

/ Regards, David
_______________________________________________
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.

References: 
 >Re: The Problems with NSController (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: The Problems with NSController
  • Next by Date: Re: The Problems with NSController
  • Previous by thread: Re: The Problems with NSController
  • Next by thread: Re: The Problems with NSController
  • Index(es):
    • Date
    • Thread