Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSObject -poseAs:



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to 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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.