• 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
Re: Re: Problem overriding a factory class mehtod
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Problem overriding a factory class mehtod


  • Subject: Re: Re: Problem overriding a factory class mehtod
  • From: "Alan Smith" <email@hidden>
  • Date: Thu, 2 Nov 2006 22:02:43 -0500

I asked the same question a while back and was told to use
poseAsClass, like this:

[FooB poseAsClass: [FooA class]];

Then whenever you would normally get a FooA object you get a FooB.
That is what poseAsClass is for.

As far as I can tell

+(id)fooWith***
{
 // make x, y, z
 return [[[self alloc] initWithX:x y:y z:z] autorelease];
}

should work fine.

Good luck, Alan

--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"When the World realizes that religion really is unimportant, then it
shall evolve."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Problem overriding a factory class mehtod (From: Ivan Kourtev <email@hidden>)
 >Re: Problem overriding a factory class mehtod (From: "Julien Jalon" <email@hidden>)
 >Re: Problem overriding a factory class mehtod (From: Ivan Kourtev <email@hidden>)

  • Prev by Date: Re: Problem overriding a factory class mehtod
  • Next by Date: Re: Invisible Characters & Specifying Their "Width"
  • Previous by thread: Re: Problem overriding a factory class mehtod
  • Next by thread: isEqualToArray: returning NO for equal arrays
  • Index(es):
    • Date
    • Thread