• 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: assign property behaves differently from simple instance variable???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: assign property behaves differently from simple instance variable???


  • Subject: Re: assign property behaves differently from simple instance variable???
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 14 Dec 2010 09:01:55 -0800

On Mon, 13 Dec 2010 11:31:38 -0800, Wim Lewis <email@hidden> said:
>
>On 13 Dec 2010, at 11:01 AM, Matt Neuburg wrote:
>> How can this seemingly minor change make such a big difference? I'm not even *using* the synthesized accessor! Yet its mere presence breaks the project. How can this be? m.
>>
>> PS A new discovery: changing the name of the ivar / property to "fr" solves the problem. So it appears that the problem is that I'm synthesizing accessors for the *name* "firstResponder". It is as if this name was being used under the hood in some way I'm unaware of, and synthesizing an accessor breaks its use. But how can *that* be?
>
>Perhaps it stomps on the -isFirstResponder method? KVC access for 'foo' checks (among other things) '-isFoo', presumably so that boolean properties feel natural; perhaps synthesizing a 'foo' property likewise causes the object to respond to 'isFoo'.
>
>Hmm, also, it appears that UIResponder has some undocumented methods -firstResponder and -_firstResponder, which your synthesized property would also interfere with.

Doubtless. But how would I have discovered this?

Doesn't anyone besides me want to evince any outrage that this can happen? I mean, sheesh, if I wanted to live in a world where the namespace was polluted with secret undocumented terminology I could collide with accidentally, I could use AppleScript. m.

--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: assign property behaves differently from simple instance variable???
      • From: Kyle Sluder <email@hidden>
    • Re: assign property behaves differently from simple instance variable???
      • From: Dave Keck <email@hidden>
  • Prev by Date: Re: convert CFRange to NSRange?
  • Next by Date: Re: assign property behaves differently from simple instance variable???
  • Previous by thread: NSNetService resolution and sleep
  • Next by thread: Re: assign property behaves differently from simple instance variable???
  • Index(es):
    • Date
    • Thread