Skip navigation.
 
mlRe: NSAppleScript crash on executeAndReturnError
FROM : Charles Srstka
DATE : Sun Nov 28 22:51:18 2004

On Nov 28, 2004, at 2:58 PM, James J. Merkel wrote:

> I have playing with a method to get  the comment from the Finder's Get
> Info window as follows:
>
> <snip>
>
> This works fine provided the file in the line:
> appleScriptString = [appleScriptString
> stringByAppendingString:hfsStylePathString];
> is a valid path.
>
> However if I comment out the above line to simulate a null file name,
> I get the errors:
>    NSAppleScriptErrorBriefMessage = "Can't get comment of file \"\".";
>    NSAppleScriptErrorMessage = "Finder got an error: Can't get
> comment of file \"\".";
>    NSAppleScriptErrorNumber = -1728;
>    NSAppleScriptErrorRange = <0000001f 00000007 >;
>
> which I would expect, but the application also (sometimes) crashes.
> I would have expected that, since an error was detected, a crash would
> not occur.
> Is this a bug in NSAppleScript. or am I doing something else wrong?
>
> TIA,
> Jim Merkel


On which line is it crashing?

Charles

Related mailsAuthorDate
mlNSAppleScript crash on executeAndReturnError James J. Merkel Nov 28, 21:58
mlRe: NSAppleScript crash on executeAndReturnError Charles Srstka Nov 28, 22:51
mlRe: NSAppleScript crash on executeAndReturnError Nick Zitzmann Nov 28, 23:08
mlRe: NSAppleScript crash on executeAndReturnError James J. Merkel Nov 29, 01:51
mlRe: NSAppleScript crash on executeAndReturnError Charles Srstka Nov 29, 02:22
mlRe: NSAppleScript crash on executeAndReturnError James J. Merkel Nov 29, 03:36