This repository was archived by the owner on Aug 31, 2021. It is now read-only.
馃崉 com.livecode.file: Add "command argument _ parsed as file" #3318
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using lc-run on Windows, there's the problem of correctly converting a command argument string that should be a filename into a correct LiveCode-style file path, so that it can be passed to the com.livecode.file APIs. At the moment, lc-run itself isn't quite right, because it only accepts LiveCode-style paths as arguments (and this is quite awkward for things like "getting the testsuite working").
This change set adds:
the current directory
, a statement that evaluates to the current working directorycommand argument _ parsed as file
, which performs processing steps on its argument to convert it to a canonical LiveCode-style file path stringI've prototyped it in LCB, but once the behaviour is pinned down I want to translate it to C++ in libfoundation-system so that lc-run can use it during startup.
I'm not sure this is totally correct at the moment, because:
command argument element 1 of the command arguments parsed as file
is totally unambiguous, quite useful, and horrifically uglyFeedback very welcome!