• 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
Lack of Initializers or Factory Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lack of Initializers or Factory Methods


  • Subject: Lack of Initializers or Factory Methods
  • From: Gordon Apple <email@hidden>
  • Date: Mon, 03 Nov 2008 09:53:57 -0600
  • Thread-topic: Lack of Initializers or Factory Methods

    The following example is one of several I have run into recently.

    Inheritance is as follows:  CAKeyframeAnimation: CAPropertyAnimation :
CAAnimation.  CAKeyframeAnimation has no explicit initializer or factory
method.  Dudney's book uses [CAKeyframeAnimation animation] to create an
object.  However, CAKeyframeAnimation has no such factory method.
CAAnimation does. Why should I assume that the "animation" factory method
will return an object of class CAKeyframeAnimation instead of CAAnimation
when it is not re-defined in CAKeyframeAnimation.h?

    The docs say that CAKeyframeAnimation shoud be created with the
inherited (from CAPropertyAnimation) animationWithKeyPath factory method.
That raises the same issue.

      Is there a basic assumption that such factory methods are implicitly
redefined for all subclasses?


_______________________________________________

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: Lack of Initializers or Factory Methods
      • From: Charles Steinman <email@hidden>
    • Re: Lack of Initializers or Factory Methods
      • From: Jim Correia <email@hidden>
  • Prev by Date: Modal Dialog Issue
  • Next by Date: Re: External Program Control from within Cocoa App
  • Previous by thread: Re: Modal Dialog Issue
  • Next by thread: Re: Lack of Initializers or Factory Methods
  • Index(es):
    • Date
    • Thread