Design Element
Comment on "A Roadmap Through Cocoa"
by Peter Hosey — Jan 23
I just tried it on a stock Cocoa project template on Xcode 2.4 and it doesn't say a thing about it. —Scott

Not so. The trick is that it gives the warning on the use of the shadowing local variable, not the declaration of it.

- initWithFoo:(NSObject *)foo { //No warning here if((self = [super init])) { [foo bar]; //Warning here } return self; }
Back to "A Roadmap Through Cocoa"
Design Element

Copyright © Scott Stevenson 2004-2015