• 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: String syntax coloring is a mess
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String syntax coloring is a mess


  • Subject: Re: String syntax coloring is a mess
  • From: Ron Fleckner <email@hidden>
  • Date: Sat, 8 Dec 2007 14:07:26 +1100


On 08/12/2007, at 5:59 AM, kwiley wrote:

I've had the following problem with Xcode for years. CodeWarrior never had this problem. I have never complained about it because I was hoping Xcode 3 would fix it, but I just got Leopard and Xcode and it's still there. Erg!

The problem is that when opening or closing string constants with a double quote character, the syntax coloring often gets screwed up. The most common symptom is that code below the string constant is all turned string color when the string is opened (fair enough), but is left string colored with the string is closed. In my experience, this problem is solved by paging up or down far enough to push the miscolored text off the screen, and then paging back again...what a nuisance. More seriously, if your code is too short to page up or down enough to remove the incorrectly colored code from the screen, then you simply cannot get the color right again without closing and reopening the file. Another fix is to type two double quotes in a row, thus opening and closing a new empty string. Sometimes this fixes the coloring...sometimes not. Then I have to delete the useless empty string of course.

Am I the only person who has ever noticed this? If not, why hasn't it been solved yet? It's been around for years. One easy solution would be to provide a command to force Xcode to immediately reevaluate the syntax coloring and clean up the screen...although CodeWarrior simply didn't have this problem. I explored the menus and didn't find anything to do this. Lastly, I am open to recommendations as to how to deal with this problem (short of assigning a string color that matches the default text color, that suggestion is obvious I suppose). Any ideas?

Thanks.

Yes, this has happened to me most of the time. One relatively easy fix, as has been mentioned, is to simply type ANYTHING after the closing quote, then delete. But I've also found that if I very quickly type the two quotes first it doesn't happen. So, often I'll do something like [someObject setString:@""];, then arrow back to between the quotes. It only works if you type the two double quote characters pretty fast. I always thought that this problem had something to do with the efficiency of Xcode's syntax colouring algorithm.


Ron
_______________________________________________
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


References: 
 >String syntax coloring is a mess (From: kwiley <email@hidden>)

  • Prev by Date: Re: Interface Builder connection confusion (Xcode 3.0)
  • Next by Date: Re: Problems compiling OpenGL app with FBO extensions
  • Previous by thread: Re: String syntax coloring is a mess
  • Next by thread: Re: String syntax coloring is a mess
  • Index(es):
    • Date
    • Thread