On Dec 13, 2010, at 1:31 PM, Wim Lewis wrote:

> 
> 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.


A collision is most likely the case here.  That is why several years ago I 
adopted a coding practice of ensuring all my methods, keys, properties, etc. 
are completely unique.  For the specific case of properties and methods, I do 
this:

BOOL firstResponder_II;

- (BOOL)firstResponder_II;

- (void)someMethod_II:(int)anInt with:(int)foo multiple:(int)bar 
parameters:(int)baz;  

___________________________________________________________
Ricky A. Sharp         mailto:rsh...@instantinteractive.com
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to