• 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: NSObject -poseAs:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSObject -poseAs:


  • Subject: Re: NSObject -poseAs:
  • From: "Mike R. Manzano" <email@hidden>
  • Date: Thu, 31 May 2007 15:46:25 -0700

You can call super on a class (static) method? Neat.

I did do something like that with a global variable, and then copied the body of the actual factory method into the mock factory that executes if the flag is false. If I can just call my super's static method, then I don't have to duplicate code :)

Regardless, all this seems really messy that could be fixed with a mechanism to unpose, but at least the messiness is contained within the tests and the production code is clean.

Mike

On May 31, 2007, at 3:23 PM, Jim Brownfield wrote:


Can't you just set a static flag to indicate you're done, and just call [super ...] when the flag is on?


--
Jim Brownfield
email@hidden
Radical System Solutions, Inc.




_______________________________________________

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


  • Follow-Ups:
    • Re: NSObject -poseAs:
      • From: Chris Hanson <email@hidden>
References: 
 >NSObject -poseAs: (From: "Mike R. Manzano" <email@hidden>)
 >Re: NSObject -poseAs: (From: "Clark Cox" <email@hidden>)
 >Re: NSObject -poseAs: (From: "Mike R. Manzano" <email@hidden>)
 >Re: NSObject -poseAs: (From: Jim Brownfield <email@hidden>)

  • Prev by Date: Any way to run an NSInvocation on the main thread?
  • Next by Date: Fwd: Any way to run an NSInvocation on the main thread?
  • Previous by thread: Re: NSObject -poseAs:
  • Next by thread: Re: NSObject -poseAs:
  • Index(es):
    • Date
    • Thread