Tip: Solving Errant Compiling Errors in Script Editor for OS X -or- This should work!!! Why won't it compile????
Tip: Solving Errant Compiling Errors in Script Editor for OS X -or- This should work!!! Why won't it compile????
- Subject: Tip: Solving Errant Compiling Errors in Script Editor for OS X -or- This should work!!! Why won't it compile????
- From: Johnny AppleScript <email@hidden>
- Date: Sat, 09 Aug 2003 01:55:41 -0600
Hi Folks,
While trying to solve other compiler and stability problems, I started
noticing that code that *absolutely should* work simply would not compile
amongst other code that would; e.g.:
Tell application "Mail"
Make new outgoing message
End tell
--> Syntax Error: Expected "," but found expression. ['message' highlighted]
Sometimes the same code would compile in SE 1.9, or Smile (any version), and
sometimes it wouldn't. Not a huge problem if you're absolutely certain the
code you're trying to compile is 100% correct, you'd start looking elsewhere
for the problem (like blaming the beta Script Editor), but when it is
totally new syntax territory for you, and won't/wouldn't compile anywhere,
you start thinking your apps, osax or additions are broken somehow, or your
missing some critical, undocumented 'at the end of' magic magic.
Anyway, as always, it turns out that general troubleshooting volleys from
days gone by still hold value; i.e., when in doubt, zap the PRAM and rebuild
the Desktop DB/DF, and "other placeboes" right?
Yup. Turns out the OS X (Jaguar) equivalent of rebuilding the Desktop, i.e.,
deleting:
~/Library/Caches/com.apple.LaunchServices.UserCache.csstore
...allowed my editors to properly associate the desired syntax to the
correct and current version of the application in question, and thus compile
and execute as expected.
In the example above, apparently LaunchServices had become tied to an older
version of Mail as part of a working backup archive of older versions of OS
X on another partition (used to test backwards compatibility with scripts
and apps); possibly from OS X 10.2.1-3, or possibly as old as 10.1.2.
In OS X 10.1.x, the equivalent files would be LSSApplications and
LSSAcclaimedTypes (or something like that; email me if you really need to
know).
So, anyway, not that many of you probably keep too many versions of the same
application on disk, but my point is that when you can't get code to compile
that you are certain should (excluding those that people tell you don't
require a third party osax you really need after all ;-)), try deleting the
aforementioned file, logging out and logging in again.
Also, as a general troubleshooting hint with nearly any application that is
misbehaving, simply creating a new user, and try the same thing there
(assuming it is free from third party system enhancers; be cautious when
installing haxies and such "for all users" to avoid this potential
system-wide, user-wide conflict). If what you want to do works for a virgin
user, chances are you either have corrupt cache or preferences files, or you
have a third party application conflict. From there, it's super easy and
quick to narrow it down further.
As for me, I'll have to get back in the habit of unmounting my active,
alternate boot partitions.
Cheers, HTH
JA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.