[Q] More clear documentation for the Cocoa Binding?
[Q] More clear documentation for the Cocoa Binding?
- Subject: [Q] More clear documentation for the Cocoa Binding?
- From: JongAm Park <email@hidden>
- Date: Sun, 14 Jan 2007 22:33:26 -0800
Well... Today I found out why the Cocoa binding looks difficult to me.
The concept is easy to understand, but how to use is hard to understand.
For example, let's assume these two cases :
1. When you use the NSObjectController
2. When you use the NSArrayController
In both cases, what you should do is to interconnect :
- a model and a NS*Controller
- a view and a NS*Controller
For the case 1, you provide the content of the NSObjectController by
connect the instantiated model object to the NSObjectController via
the "content" outlet of the NSObjectController. OK. It looks reasonable.
However, when you open the NSObjectController's Binding property, you
can see that the "content object" under "Controller Content" is not
bounded to anything.
What is this "content object" property? Anyway using the content
outlet, the model is connected to the controller.
For the case 2, a document (http://developer.apple.com/documentation/
Cocoa/Conceptual/CocoaBindings/index.html#//apple_ref/doc/uid/
10000167i ) says that the model, which is an array of objects, not an
object, is a content.
( Can't it be an object? )
Anyway, although you can see the "content" outlet there, but you
should mark the array of the objects as the NSArrayController's
content using its "content object" under "Controller Content"
properties.
Why are the both case so different and inconsistent?
Why doesn't it hide the other property which is not used?
The document doesn't explain them cleary. As far as I know, it
doesn't explain it at all.
Also, although it explains with the examples, I think it should be
cleary stated in its main document, "Cocoa Bindings Programming Topics"
Can anyone please explain those to me?
Thank you.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden