dragData["files"] problem
Garrett Hylltun
garrett at paraboliclogic.com
Thu May 25 19:53:58 EDT 2006
Rev 2.6.1 / OS X
Greetings,
I've run into a bit of an odd thing that I can't figure out. I have a
file with the following path:
/Users/garrett/Desktop/My Music/Metal Rules/Alice In Chains - Man in the
box.mp3
But when I drag and drop it on my app I get the following instead:
/Users/garrett/Desktop/My Music/Metal Rules/Alice In Chains - Man#88B1F.mp3
Is there a character length limit on incoming file names for the
dragData["files"]?
Here's the code I am using:
on dragEnter
set the acceptDrop to true
end dragEnter
on dragDrop
if the dragData = empty then
exit dragDrop
else
put dragData["files"] into varDroppedFile
--answer varDroppedFile
put number of lines of varDroppedFile into varFileCount
if varFileCount > 1 then
put the first line of varDroppedFile into varDroppedFile
end if
set the itemdel to "."
put the last item of varDroppedFile into varFileExt
if varFileExt is "aif" or varFileExt is "m4a" or varFileExt is
"mp3" or varFileExt is "wav" then
subNewFileToPlay varDroppedFile
end if
end if
end dragDrop
Thanks,
-Garrett
More information about the use-livecode
mailing list