[Pythonmac-SIG] CFURL Pain

Paul Berkowitz berkowit at silcom.com
Thu Mar 3 16:54:43 CET 2005


On 3/3/05 7:31 AM, "has" <hengist.podd at virgin.net> wrote:

> Paul Berkowitz  wrote:
> 
>> The type 'alias' for the Save command in the Standard Suite is a long,
>> longstanding bug in AppleScript.
> 
> Replacing (as of 10.3) a previous long, longstanding implementation
> bug where it was specified as a POSIX path string. :p

Bo, that one was quite short-standing (OS 10.1 and 10.2) and only for
TextEdit. Only TextEdit specified a POSIX path string for 'save' - it has
now been changed to standard AppleScript colon-delimited paths to correspond
with all other apps.
> 
> I take it 'alias' is just a documentation error then, and the
> application will also accept a file spec/file url type identifying an
> existing/not-yet-created file.

Yes.
> 
> 
>> Fortunately there is an equally
>> longstanding coercion, performs by AppleScript itself, that allows you to
>> use a string or Unicode text there
> 
> Presumably there's a POSIX path string-to-file object coercion
> introduced in 10.3 to maintain compatibility scripts written for
> Cocoa apps in 10.2, where 'save...in' took a POSIX path string
> instead of a file object.

No, that's broken - it was only TextEdit in OS 10.1 and 10.2 that ever did
the POSIX paths. ( 'save document 1 in "/Volumes/PB G5 HD
Panther/Users/berkowit/Desktop/TestDoc.rtf"' saves the document in a file of
that exact entire name - complete with forward slashes - on my root startup
disk!!) Only colon-delimited paths work correctly now, not POSIX paths. I
can't imagine that there are too many broken scripts since TextEdit's
scriptability is so limited in the first place that there's not much you can
do with it.



-- 
Paul Berkowitz




More information about the Pythonmac-SIG mailing list