Re: KVO Oddity
Re: KVO Oddity
- Subject: Re: KVO Oddity
- From: Allan Odgaard <email@hidden>
- Date: Fri, 14 May 2004 15:38:07 +0200
On 14. May 2004, at 10:23, Louis C. Sacha wrote:
Apple reserves the use of the underscore prefix [...] Regarding naming
variables
http://developer.apple.com/documentation/Cocoa/Conceptual/
CodingGuidelines/Articles/NamingIvarsAndTypes.html
Where the argument is to avoid 'name clashes', but with KVC this seems
to be inevitable. I.e. if we have:
@interface AppleStuff { id _foo; } @end
And then
@interface MyStuff : AppleStuff { id foo; } @end
Then I can do "obj->foo" and Apple can do "obj->_foo" w/o clashes. But
[obj valueForKey:@"foo"] return Apple's private version.
This is actually a quite serious flaw in the guidelines IMHO.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.