Re: Edit-in-Scope subtleties
Re: Edit-in-Scope subtleties
- Subject: Re: Edit-in-Scope subtleties
- From: Andy Lee <email@hidden>
- Date: Fri, 25 Sep 2009 23:58:17 -0400
Hi Fritz,
I reproduced what you described. It was simple to do and I got the
identical results. I think this is clearly an Xcode parser bug. The
parentheses in the expressions you're assigning to completionComponent
and yardageComponent are somehow confusing it. Change those
assignments to something simple like 1.0 on the right hand side and
now Edit in Scope works.
Even weirder, if I make a copy of this method called rating2, and put
it below, *now* clicking yardageComponent causes the underline to fade
in -- in both methods!
I wonder if this is related to the crashes I sometimes get when I
refactor.
--Andy
On Sep 25, 2009, at 2:15 PM, Fritz Anderson wrote:
Consider the following method:
======
- (double) rating
{
if (self.attempts == 0)
return 0.0;
double completionComponent = (
((double) self.completions / self.attempts) * 100.0
- 30.0)
/ 20.0;
completionComponent = pinPassingComponent(completionComponent);
double yardageComponent = (
((double) self.yards / self.attempts) - 3.0) / 4.0;
yardageComponent = pinPassingComponent(yardageComponent);
double touchdownComponent =
20.0 * self.touchdowns / self.completions;
touchdownComponent = pinPassingComponent(touchdownComponent);
double pickComponent =
2.375 - (25.0 * self.interceptions / self.attempts);
pickComponent = pinPassingComponent(pickComponent);
return 100.0 * (completionComponent +
yardageComponent +
touchdownComponent +
pickComponent) / 6.0;
}
======
What is the criterion Xcode 3.2 uses to enable editing variable
names in-scope? If I click touchdownComponent or pickComponent, the
underline markers fade in, and the drop-down menu is available. When
I do the same for completionComponent or yardageComponent, I can't
get the underline to appear.
Is there a subltety to the gesture that I'm not getting?
The symbols *Component are not used in any other scope. The file
compiles. It has been saved. Indexing is on.
— F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden