Re: NSView subclass + manual binding
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.