Re: Standard Additions Bug under OS X
Re: Standard Additions Bug under OS X
- Subject: Re: Standard Additions Bug under OS X
- From: Arthur J Knapp <email@hidden>
- Date: Tue, 10 Jul 2001 10:34:59 -0400
>
Date: Tue, 10 Jul 2001 13:45:42 +1000
>
From: Steven Angier <email@hidden>
>
Subject: Standard Additions Bug under OS X
>
There seems to be a crashing bug in the Standard Additions "choose file
>
name" command under Mac OS 10.0.4.
>
>
Supplying an empty default name string (i.e. "") will crash the current
>
script editor or script application when the command is executed. For example:
>
>
choose file name with prompt "Choose a file." default name ""
>
--> crash
Confirmed. I tried it in several editors and as a script application.
Here is a work-around:
on ChooseFileName(with_prompt, default_name)
if (length of default_name < 1) then
set default_name to space
end if
choose file name with prompt with_prompt default name default_name
end ChooseFileName
try
set a_file to ChooseFileName("Choose a file.", "")
on error number -128
-- user canceled
end try
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://www.natural-innovations.com/as/