Formatting of AppleScript is gone after upgrading to Xcode 2.4.1


Has anyone experienced loss of formatting of the AppleScript code after upgrading to a higher version of Xcode?

This has happened to me and now my codes simply opens in text file format…gone are the colors and other formatting options set by the Script Editor.

Also, after upgrading I also noticed that I can’t compile anymore the upgraded version of my project. When I compile, no matter how many cleanup I do, it fails complaining that it cannot find the info.plist for the upgraded target though it is there in the project folder.

Any way I can fix these problems? At this time, the only way I can restore the colors is by opening the script file in source code format. However, the restoration of the original editing features is not complete.

Thanks for any help.

archseed :expressionless:

Do the colors appear correctly in Script Editor?


I haven’t pasted the script portion on to the Script Editor but I know there’s nothing wrong with the Script Editor.

I am away from my Macintosh right now but I will surely try and update you on the status by next post. BTW, is there an easy way to test the script from AS Studio in the Script Editor? Invariably, I could not do this because there are objects that are missing when I paste the code in the Script Editor. Or should I just pick a portion that may compile possibly in the Script Editor?

Actually, I was part of an earlier thread on this same issue, but this time the problem can’t be rectified by “clean build” approach. When I open my AS Studio code in AppleScript file format, the color is gone. The only way I could get some color is if I open the code in Source code format.



I just upgraded to 2.4.1 from 2.1 the other day and my scripts are still fine. So it probably isn’t an issue with 2.4.1. Does your script have the correct extension?

I have experienced this myself a few times, usually when I take a full project folder from one machine to another (with the same version of XCode). Somehow, an extra empty handler (usually choose item or clicked) gets thrown in there, and all the colors magically re-appear when I delete the empty handler.

I am still on 2.2.1, but I can say for sure, that the length on the script will cause the formatting to go away. I have a script that is about 4910 lines right now, and if I, for example, add 5 more lines, it will kill my formatting until I delete some other code, and then it comes right back. Cleaning targets doesn’t help, only getting rid of a few lines of code. Just thought I’d pass along the info.


Thank you all.

My script is a combination of many of your suggested possible contributors - big code, plenty of inactive handlers…etc.

I will try to clean it up and see what happens. Certainly, clean builds and all that did not make any difference.

Will update you on how things do.

archseed :slight_smile:

Does your script actually compile?

Hi Bruce,

Yes, it compiles correctly in Xcode, no problem.

I did clean things up, took out all empty handlers. Result? No improvement.

The only unresolved possible reason now, based on exchanges in this thread, is the size of the program. My program has about 5000+ lines, including comments. I can possibly tighten things up a bit but not much more.

Also, why would Xcode have a limit on size of programs? This one I cannot take as is. It just seems illogical.

archseed :slight_smile: