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

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.


  • Follow-Ups:
    • Re: KVO Oddity
      • From: "Louis C. Sacha" <email@hidden>
References: 
 >KVO Oddity (From: Chris Pavicich <email@hidden>)
 >Re: KVO Oddity (From: Scott Anguish <email@hidden>)
 >Re: KVO Oddity (From: Joakim Danielson <email@hidden>)
 >Re: KVO Oddity (From: "Louis C. Sacha" <email@hidden>)

  • Prev by Date: NSXMLParser abortParsing
  • Next by Date: Re: RegEx libraries & unicode support
  • Previous by thread: Re: KVO Oddity
  • Next by thread: Re: KVO Oddity
  • Index(es):
    • Date
    • Thread