Importing Files in SmartBasic SDK
Re: Importing Files in SmartBasic SDK
Did that. Now instead of "INPUT without Data . . .", I'm getting a Syntax error in the "DRAW IMAGE" command of one of the images external to the SmartBasic code.
Re: Importing Files in SmartBasic SDK
How is the SmartBasic code interpreted or compiled within Xcode?
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Importing Files in SmartBasic SDK
Exactly the same as it is done in smart BASIC itself. Smart BASIC interperter is included to run your program.greycheek wrote:How is the SmartBasic code interpreted or compiled within Xcode?
Re: Importing Files in SmartBasic SDK
If the interpreter is included, then is there any way to monitor its code execution? That way Maybe I can track down the problems with my program code.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Importing Files in SmartBasic SDK
Debugging is not allowed here. All tests should be performed on your device, and then program simply copied to "Samples" folder of the SDK exactly as it is on your device. In SDK similar copy of "smart BASIC" is running your already tested code.
Please note that iOS Simulator is not always equal to a real device in its execution. Especially it concerns files names - on device file system is case sensitive, on simulator - not.
Please note that iOS Simulator is not always equal to a real device in its execution. Especially it concerns files names - on device file system is case sensitive, on simulator - not.
Re: Importing Files in SmartBasic SDK
Fixed the problem. Apparently filenames cannot be passed as literals; they must be assigned to a string variable first, and passed that way. Also, each time the program is run through the simulator, the previous run must be deleted from the home screen of the simulator, before any code changes are reflected.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Importing Files in SmartBasic SDK
This code works fine in SDK:greycheek wrote:Fixed the problem. Apparently filenames cannot be passed as literals; they must be assigned to a string variable first, and passed that way. Also, each time the program is run through the simulator, the previous run must be deleted from the home screen of the simulator, before any code changes are reflected.
Code: Select all
graphics
draw image "1.jpg" at 0,0
Re: Importing Files in SmartBasic SDK
graphics
draw image "1.jpg" at 0,0
I have not been able to refetence a literal string as in the above example without generating a syntax error.
draw image "1.jpg" at 0,0
I have not been able to refetence a literal string as in the above example without generating a syntax error.
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Importing Files in SmartBasic SDK
I checked it right now, with latest SDK in Simulator of iPhone 5s.greycheek wrote:graphics
draw image "1.jpg" at 0,0
I have not been able to refetence a literal string as in the above example without generating a syntax error.