• 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: NSView subclass + manual binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView subclass + manual binding


  • Subject: Re: NSView subclass + manual binding
  • From: Raphael Sebbe <email@hidden>
  • Date: Tue, 10 Feb 2004 10:50:44 +0100

Thanks for the answer.

Another, related, question. I remember there was a way before (it still exists I guess) to write palettes (dynamic?) that would load code for custom classes in IB. Would such a palette make bindings of NSView subclasses available in IB inspector (through +exposeBinding) ? Is it recommended to do it like that ? Is there another way of declaring bindings of custom interface objects ?

Thanks,

Raphael

On 10 Feb 2004, at 10:03, mmalcolm crawford wrote:
Loosely speaking, the NSController does more for you.

More specifically, it serves as a proxy for the object you to which you wish to bind. This makes setting up a user interface much more flexible. If part of the underlying model changes, you should be able to change a single keypath in the NSController instead of re-writing a potentially large number of lines of code used to set up bindings programatically (recall that much of the idea here was to reduce the amount of code you have to write...) You are very much encouraged to use NSController subclasses to serve as proxies for your model objects...

If you simply want to ensure that two values are kept in sync without a controller, you are encouraged to use key-value observing.

mmalc
(With thanks to Andreas and Scott.)
_______________________________________________
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: 
 >NSView subclass + manual binding (From: Raphael Sebbe <email@hidden>)
 >Re: NSView subclass + manual binding (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Threads again: NSData leaking (using dataWithContentsOfURL)
  • Next by Date: Re: Making the correct button the default button?
  • Previous by thread: Re: NSView subclass + manual binding
  • Next by thread: Regarding to function absolute numbers.
  • Index(es):
    • Date
    • Thread