views:

149

answers:

2

XCode frequently seems to lose it's mind, and doesn't color code system classes or provide correct "code sense" suggestions. This is endlessly frustrating. The question has been asked on at least three other occasions:

http://stackoverflow.com/questions/2263994/problems-with-xcode-syntax-highlighting

http://stackoverflow.com/questions/1627033/xcode-code-sense-color-completion-not-working

http://stackoverflow.com/questions/2138047/xcode-code-loses-syntax-coloring

I have switched by project version to/from 3.1-compatiable and 3.2-compatiable, completely restarting XCode before and after each change with no effect.

I have rebuilt the code sense indexes and completely restarted XCode with no change.

I have built my project to make sure there are no errors and restarted.

I have copied my files (sans .svn files) to a different location - same problem.

I've already completely disabled the argument "placeholders" because they screw up my documents when i type too fast... all I'm asking for is for the "esc" key to display the correct list of properties and methods.

A: 

For anyone interested; my app has some precompile directives:

#if ...

Turns out there was an error in one of these sections.

I'm assuming my app built fine because these sections were stripped out before they ever got to the compiler... but CodeSense doesn't care about these (it still wants to color code everything inside these) - so CodeSense would puke all over the place because of the error, even though I didn't find it when I tried to build the app.

Once I fixed the error within that block of code, my coloring returned.

Would be nice if XCode just greyed out those sections instead of dying.

Steve
PS.) I posted a bug report with Apple and received the following response:Hello Steven,This is a follow up to Bug ID# 8069971. After further investigation it has been determined that this is a known issue, which is currently being investigated by engineering. This issue has been filed in our bug database under the original Bug ID# 4824854. The original bug number being used to track this duplicate issue can be found in the State column, in this format: Duplicate/OrigBug#.
Steve
A: 

I see you found your problem. That is good but take note that XCode has a lot of bugs. Don't even try to use it for Python. XCode and the associated tools have never left me with a warm fuzzy feeling.

There are to many little things that just shouldn't happen. Things like not saving a file the way I want. Some of the issues I've seen are expected from alpha software not shipping products.

Dave

David Frantz
Really? My experience is different to yours. Xcode is not perfect but it is generally pretty stable. I've never had a problem with it not saving files, although things can get confusing if you have a file open in more than one window.
JeremyP