AppleScript 1.9 (Mac OS X Jaguar)

FIXED BUGS

Long lists of fixed AppleScript-related bugs have been made available by Apple in the AppleScript 1.9.0 for Mac OS X Release Notes and the Mac OS X 10.2 Technical Note 2053, and they will not be repeated here.

Additional information about bugs fixed in AppleScript 1.9 appears below.

A bug whereby an Out of Memory error message was generated when using Choose Application in a Classic script was fixed in Mac OS X 10.2, as reported in AppleCare KnowledgeBase Document 75250.

NEW (AND OLD) BUGS

Users promptly reported that ‘alias :’ no longer generates a reference to a script’s container, as ‘file specification :’ still does, but a reference to the startup disk. Apple’s Chris Nebel was equally prompt in explaining that using a colon in this fashion was never supposed to work; it was an accident and people shouldn’t have relied on it. However, since so many people have come to rely on it anyway, he will try to make it continue to work as expected. My advice: don’t rely on it. Forcing Apple to make extraneous changes to the system just to maintain accidental behavior will lead to long-term degradation of the system and place unreasonable constraints on maintenance and revisions.

Apple’s Tim Bumgarner reported that, shortly after the release of Jaguar, it was discovered that applications built using AppleScript Studio 1.2 will not run on older versions of Mac OS X. The cause is the use of a new Jaguar function in a Studio application’s main.m file that prevents the application from launching on older systems lacking the function. The cure is to substitute a new, customized main.m file in your Studio projects if backward compatibility is desired. Details are set out in AppleCare KnowledgeBase Document 75397. The easiest way to ensure that the new file is always used in new projects you write is to place it in your Project Templates folder. This problem will be fixed in the next public release of the Developer Tools. By the way, Tim posts many good AppleScript Studio example projects to his home page.

Many scripters are encountering problems when attempting to use As String coercions in parameters to AppleScript Studio commands. Apple’s Chris Nebel pointed out that AppleScript Studio uses Unicode throughout, as does Cocoa, and that As Unicode Text would be a more appropriate coercion. Chris added that AppleScirpt’s plain text is a bad idea generally in modern times since it doesn’t have a specified encoding and can’t accurately represent many strings that are not pure ASCII.

The SOAP version of the AppleScript Studio Currency Converter example is missing. The contents of the folder are in fact the same as the regular Currency Converter example.

The outline view in AppleScript Studio 1.2 does not support drag and drop in this release.

Script Editor 1.9 will not re-save an AppleScript application as a compiled script.

Script Editor 1.9 lists two script formats with the same name but different capitalization in the Format pop-up menu when you choose File > Save As, after you have saved a script in a particular format once for example, Compiled Script and compiled script. (This behavior apparently originated in Mac OS X 10.1.) There is no difference between files saved in either format, according to AppleCare KnowledgeBase Document 107092. However, MacScripter.net reported on October 9, 2002 that the Compiled Script (capitalized) format saves the script in the data fork of the file, while the compiled script (lower case) format saves it in the resource fork. Many applications that read compiled scripts don’t yet recognize the new, Mac OS X-standard data-fork script format.

The Paste Reference menu item is always dimmed and unavailable in Script Editor 1.9, as reported in AppleCare KnowledgeBase Document 107065.

Chris Espinosa confirmed a bug whereby setting the contents of a reference to an item in a record actually sets the contents of the entire record, discarding all the other items in the record. This is a serious bug for scripters unaware of it; take care when scripting records.

Ray Robertson reported a very strange bug, whereby an AppleScript application fails to run if it is located on the same level as a folder named Support Files. (This problem apparently originated in Mac OS X 10.1.5.)

See the discussion of the System Events and loginwindow applications above for a few issues and workarounds regarding use of the Shut Down, Restart, Sleep, and Log Out commands.

See the discussion of iDVD above for the fix to a problem where some installations of the application apparently omit the scripting dictionary.

NEW (AND OLD) BUGS

Users promptly reported that ‘alias :’ no longer generates a reference to a script’s container, as ‘file specification :’ still does, but a reference to the startup disk. Apple’s Chris Nebel was equally prompt in explaining that using a colon in this fashion was never supposed to work; it was an accident and people shouldn’t have relied on it. However, since so many people have come to rely on it anyway, he will try to make it continue to work as expected. My advice: don’t rely on it. Forcing Apple to make extraneous changes to the system just to maintain accidental behavior will lead to long-term degradation of the system and place unreasonable constraints on maintenance and revisions.

Apple’s Tim Bumgarner reported that, shortly after the release of Jaguar, it was discovered that applications built using AppleScript Studio 1.2 will not run on older versions of Mac OS X. The cause is the use of a new Jaguar function in a Studio application’s main.m file that prevents the application from launching on older systems lacking the function. The cure is to substitute a new, customized main.m file in your Studio projects if backward compatibility is desired. Details are set out in AppleCare KnowledgeBase Document 75397. The easiest way to ensure that the new file is always used in new projects you write is to place it in your Project Templates folder. This problem will be fixed in the next public release of the Developer Tools. By the way, Tim posts many good AppleScript Studio example projects to his home page.

Many scripters are encountering problems when attempting to use As String coercions in parameters to AppleScript Studio commands. Apple’s Chris Nebel pointed out that AppleScript Studio uses Unicode throughout, as does Cocoa, and that As Unicode Text would be a more appropriate coercion. Chris added that AppleScirpt’s plain text is a bad idea generally in modern times since it doesn’t have a specified encoding and can’t accurately represent many strings that are not pure ASCII.

The SOAP version of the AppleScript Studio Currency Converter example is missing. The contents of the folder are in fact the same as the regular Currency Converter example.

The outline view in AppleScript Studio 1.2 does not support drag and drop in this release.

Script Editor 1.9 will not re-save an AppleScript application as a compiled script.

Script Editor 1.9 lists two script formats with the same name but different capitalization in the Format pop-up menu when you choose File > Save As, after you have saved a script in a particular format once for example, Compiled Script and compiled script. (This behavior apparently originated in Mac OS X 10.1.) There is no difference between files saved in either format, according to AppleCare KnowledgeBase Document 107092. However, MacScripter.net reported on October 9, 2002 that the Compiled Script (capitalized) format saves the script in the data fork of the file, while the compiled script (lower case) format saves it in the resource fork. Many applications that read compiled scripts don’t yet recognize the new, Mac OS X-standard data-fork script format.

The Paste Reference menu item is always dimmed and unavailable in Script Editor 1.9, as reported in AppleCare KnowledgeBase Document 107065.

Chris Espinosa confirmed a bug whereby setting the contents of a reference to an item in a record actually sets the contents of the entire record, discarding all the other items in the record. This is a serious bug for scripters unaware of it; take care when scripting records.

Ray Robertson reported a very strange bug, whereby an AppleScript application fails to run if it is located on the same level as a folder named Support Files. (This problem apparently originated in Mac OS X 10.1.5.)

See the discussion of the System Events and loginwindow applications above for a few issues and workarounds regarding use of the Shut Down, Restart, Sleep, and Log Out commands.

See the discussion of iDVD above for the fix to a problem where some installations of the application apparently omit the scripting dictionary.