dragData["files"] problem
Klaus Major
klaus at major-k.de
Fri May 26 06:22:37 EDT 2006
Hi Ken and all,
> On 5/25/06 11:04 PM, "J. Landman Gay" <jacque at hyperactivesw.com>
> wrote:
>
>> Maybe someone else can come up with a better way, or fix this one. Or
>> there may be an Applescript function that allows you to get the
>> long name.
>
> Yes, there is... here's my stsLongFilePath function in action:
>
> on dragDrop
> put the dragdata["files"] into tPath
> put stsLongFilePath(tPath) after fld 1 -- or
> end dragDrop
>
> function stsLongFilePath pPath
> switch (the platform)
> case "MacOS" -- assumes OS X
> put "set tPath to" && quote & pPath & quote & cr & \
> "set tPath to (POSIX file tPath) as string" & cr & \
> "POSIX path of tPath" into tScript
> do tScript as "AppleScript"
> return (char 2 to -2 of the result) -- strips quotes
> break
> case "Win32"
> return the longFilePath of pPath
> break
> end switch
> end stsLongFilePath
>
> Enjoy!
very nice, Ken :-)
But i think it is worth mentioning that this will only DISPLAY the
correct filepath.
You cannot use that correct filepath in Rev in any way!
Example:
Path returned by Rev:
/Users/klaus/Desktop/Widerspruch und Klag#51BF4F.pdf
stsLongFilePath:
/Users/klaus/Desktop/Widerspruch und Klage - S 11 AS 105.pdf
"launch document xyz" will only work with the first "crippled" path
returned by Rev
(with drag and drop or "Answer file"), NOTHING will happen with the
second and
"correct" path.
This is a very long known bug (Bugzilla: 396, 08/20/2003!) and does
affect ALL file
handling actions in Rev on OS X, especially player objects and is a
real shwostopper
in my opinion. This bug is also related to path names with umlauts/
accents etc...
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
Regards
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list