Bindings: Specifying the Class of a Controller’s Content
Bindings: Specifying the Class of a Controller’s Content
- Subject: Bindings: Specifying the Class of a Controller’s Content
- From: "Oleg Krupnov" <email@hidden>
- Date: Fri, 29 Aug 2008 20:38:12 +0300
Here's a fragment of documentation from the "Cocoa Bindings
Programming Topics" guide:
"In order for a controller to create new content objects automatically
or in response to the target-action methods, it must know the
appropriate class to use."
My question is: what is a real example of a case when the controller
needs to create new content objects?
As far as I see, it can only happen when a view sends addObject to the
controller, but in that case the object is already created and the
controller simply adds it to the collection. Have I missed something?
Also, if the controller does need to know the class/entity of the
content object, what about polymorphic objects? I.e. I have one
abstract entity "Shape" which is not directly instantiatable, and a
few concrete subclasses. What entity should I specify?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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