Commandline arguments (glfw/stdcpp/xna)
Monkey Forums/Monkey Programming/Commandline arguments (glfw/stdcpp/xna)| 
 | ||
| Hey, by any chance has anyone written a module to support these?  I've written a little editor for my engine in another language and it would be real helpful to supply arguments to my app rather than writing to a file and having an open stream so that I can test levels directly from the editor.  I am unaware if there is any support for this whatsoever, or if any of the current module makers have added this in.. | 
| 
 | ||
| The os module has AppArgs, which returns a string array. Doesn't cover XNA, though... I'm not sure if you'd get command-line arguments in an XNA app. | 
| 
 | ||
| thanks, that's probably what I was looking for :) I'll look into it. | 
| 
 | ||
| Damn, importing "os" has created a lot of duplicate LoadString identifiers.  I'm not sure I want to refactor my entire project to fix this.  Is there a common practice (other than specifying app.LoadString or os.LoadString from the beginning) for importing both os and mojo to avoid this conflict? I've tried putting "import os" into a compiler directive to only load on GLFW, but as expected, the compiler doesn't like it in any case. Perhaps there's some way to shadow the function.... EDIT: Scratch that, I guess I'll refactor the whole thing. Hurrgh, I guess this is really the best way. Anyone who is reading this though, for the benefit of all, if it isn't the best way please do say something | 
| 
 | ||
| Alias LoadString = os.LoadString | 
| 
 | ||
| Thank you, kind sir.  Amazing I've gone this far without having to need this.  I will put it to good use. |