• 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
Bindings: Specifying the Class of a Controller’s Content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Bindings: Specifying the Class of a Controller’s Content
      • From: Ron Lue-Sang <email@hidden>
    • Re: Bindings: Specifying the Class of a Controller’s Content
      • From: Dave Dribin <email@hidden>
  • Prev by Date: Re: What to use observeValueForKeyPath: context
  • Next by Date: Re: Help with "ditto"
  • Previous by thread: Re: Help with "ditto"
  • Next by thread: Re: Bindings: Specifying the Class of a Controller’s Content
  • Index(es):
    • Date
    • Thread