Re: Strange path
Re: Strange path
- Subject: Re: Strange path
- From: Nigel Garvey <email@hidden>
- Date: Wed, 21 Jul 2004 20:33:50 +0100
John Azevedo wrote on Wed, 21 Jul 2004 10:59:41 -0400:
>
Why am I getting the following result?
>
>
set x to path to preferences
>
set y to x & "foo" as text
>
>
Result: "OS X:Users:zoff:Library:Preferences:/foo"
You probably have AppleScript's text item delimiters set to "/". As Paul
says, concatenating a string to an alias produces a list. The oblique
stroke would be introduced if you had the TID's set to that when you
coerced the list to string. The default setting for TID's is {""}.
>
My current workaround is This:
>
>
set x to POSIX path of (path to preferences)
>
set y to x & "foo" as text
>
>
Result: "/Users/zoff/Library/Preferences/foo"
That's not so much a "workaround" as a way of getting a POSIX path. :-)
NG
_______________________________________________
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.