Hello Jay,
Thanks for the suggestion. It is def. not just you having this issue. This problem always occurs when launching from the command line. We have tried:
"C:\Program Files (x86)\Corona Labs\Corona SDK\Corona Simulator.exe" -project "C:\Program Files (x86)\Corona Labs\Corona SDK\Sample Code\GettingStarted\Timer\main.lua"
and we tried playing around with the working directory:
C:\Program Files (x86)\Corona Labs\Corona SDK\>"Corona Simulator.exe" "C:\Program Files (x86)\Corona Labs\Corona SDK\Sample Code\GettingStarted\Timer\main.lua"
maybe the sandbox directory?
C:\Users\ricebowl1988\AppData\Roaming\Corona Labs\Corona Simulator\Sandbox\timer -605C6E18DA3010BB006454637F81AAD1\>"C:\Program Files (x86)\Corona Labs\Corona SDK \Corona Simulator.exe" "C:\Program Files (x86)\Corona Labs\Corona SDK\Sample Co de\GettingStarted\Timer\main.lua"
All of these still result in double print.
Here is what might be going on. When launching from the command line the lua interpreter starts first and runs the main chunk. This results in the first print. After running the main chunk Corona tries to draw the first frame but notices that the simulator window is not opened yet. So it goes ahead and launches the opengl simulator window and re-runs the program. This is where the double print comes from.
This is evident by placing a breakpoint in the main chunk. The first time it hits you will notice that the simulator window is not launched. The second time it hits the simulator window is launched.
Is this what you also observed? It would be nice to have the command line stuff documented, I am sure everyone would like a feature to build from command line for instance. All we were able to find on this feature is gui automation:http://vimeo.com/29936594 But there should really be a cleaner way to do this via the command line.
Regards,
M.Y. Developers