"/" or "\" - LiveCode is inconsistent
Posted: Wed Oct 25, 2017 2:55 pm
Hi all,
I've noticed that if I grab a directory of a file using code like this:
It returns something like this:
However, if I use this code:
I get something like this:
This is a problem. It seems like LiveCode is reading natural data paths with a "\" but then if you set a defaultFolder to the desktop, it creates the path with a "/".
Why are the slashes inconsistent? Is this a bug?
I've noticed that if I grab a directory of a file using code like this:
Code: Select all
on dragDrop
repeat for each line theLine in the dragData["files"]
put URL ("file:" & theLine) into theFilePath
end repeat
end dragDrop
Code: Select all
C:\Users\ID\Desktop\Folder Here\File Here
Code: Select all
set the defaultFolder to specialFolderPath("Desktop")
put defaultFolder & "\" & "New Folder Here" into NewPathHere
Code: Select all
C:/Users/ID/Desktop\New Folder Here
Why are the slashes inconsistent? Is this a bug?