I need to make a standalone for both Windows (ptui) and Mac. I need to write a file to a remote server. The Mac uses forward slashes (/) to delimit levels of the pathName, but Windows uses backSlashes (\).
How does a standalone know which machine it is running on? The "systemVersion" function can be massaged, but I was wondering if there was an explicit function that was designed for the purpose.
Craig Newman
Environment question
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10057
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Environment question
You would only need platform-specific path delimiters when calling shell or other things that rely on platform-specific systems.
Chapter 11 of the User Guide, "Transferring Information with Files, the Internet and Sockets", includes this note in a callout box on page 323:
Chapter 11 of the User Guide, "Transferring Information with Files, the Internet and Sockets", includes this note in a callout box on page 323:
Will you be using LC Server to receive the file, or something else?Important: Each platform has its own way for programmers to specify file paths. The file path shown above is in the usual style for file paths on Unix systems. For cross-platform compatibility, LiveCode uses this same forward slash / character in its file path regardless of the current platform. This way, you can generally specify file and work with paths in your scripts without having to convert them when you switch platforms.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Environment question
Richard.
Oh, goody.
Thanks so much.
So LC translates as required, in the same way it does so in other instances, like "write to file" for end-of-line characters.
Craig
Oh, goody.
Thanks so much.
So LC translates as required, in the same way it does so in other instances, like "write to file" for end-of-line characters.
Craig