Page 1 of 2
Adding smart BASIC to Xcode Tutorial
Posted: Sat Jul 02, 2016 11:00 am
by Elliot
I am getting close!! I got it to run on the iphone simulator. Instead of the actual Turtle program, I just had a one-line BASIC program:
PRINT "My name is Elliot."
The simulator produced an error message on the phone face:
Syntax error
PRINT "My name is Elliot."
OK
So what now?
Re: Adding smart BASIC to Xcode Tutorial
Posted: Sat Jul 02, 2016 11:21 am
by Mr. Kibernetik
Elliot wrote:I am getting close!! I got it to run on the iphone simulator. Instead of the actual Turtle program, I just had a one-line BASIC program:
PRINT "My name is Elliot."
The simulator produced an error message on the phone face:
Syntax error
PRINT "My name is Elliot."
OK
So what now?
Please create a separate topic in "Other topics" section if your question goes out of the scope of this SDK topic.
You must be sure that this file runs on your device without errors.
Re: Adding smart BASIC to Xcode Tutorial
Posted: Sat Jul 02, 2016 12:45 pm
by Elliot
I am not sure what you mean. Of course this one-line basic program runs on my iPhone using smartBASIC. What "device" do you mean? Isn't the error message generated on my iphone simulator coming from your BASIC interpreter?
Re: Adding smart BASIC to Xcode Tutorial
Posted: Sat Jul 02, 2016 1:00 pm
by Mr. Kibernetik
How did you transfer this one-line program from your iPhone (aka device) to your Xcode project on Mac?
Re: Adding smart BASIC to Xcode Tutorial
Posted: Sat Jul 02, 2016 1:42 pm
by Elliot
Used your smartBASIC Dropbox option, so it was uploaded to my Dropbox and downloaded into Download files on the Mac. Finally, copied and pasted into Samples folder.
Re: Adding smart BASIC to Xcode Tutorial
Posted: Sat Jul 02, 2016 1:54 pm
by Elliot
I left out one minor thing: I had to change the extension of the file from .txt to .xxt before I sent it to Dropbox: dropbox does not allow txt file transmissions (I think). I renamed it after putting it on the Mac.
Re: Adding smart BASIC to Xcode Tutorial
Posted: Sat Jul 02, 2016 2:08 pm
by Mr. Kibernetik
Elliot wrote:I left out one minor thing: I had to change the extension of the file from .txt to .xxt before I sent it to Dropbox: dropbox does not allow txt file transmissions (I think). I renamed it after putting it on the Mac.
So, if it is the same file (extension change does not matter) then it is very strange. Because it should not give syntax error on Simulator if it works fine on your device.
Re: Adding smart BASIC to Xcode Tutorial
Posted: Sat Jul 02, 2016 2:12 pm
by Elliot
Should I try writing a simple BASIC program, creating it in the Mac text editor and put that into Turtle.txt?
Re: Adding smart BASIC to Xcode Tutorial
Posted: Sat Jul 02, 2016 2:37 pm
by Mr. Kibernetik
If you can create simple text file then why not.
But safe way is to transfer working file from device to the Mac.
What about turtle.txt then you can use any file name. Also you can try this program from the forum.
Re: Adding smart BASIC to Xcode Tutorial
Posted: Sat Jul 02, 2016 3:19 pm
by Elliot
I think I am getting close to the problem. On the Mac, I copied the real Turtle program from your website tutorial link, then pasted it into a newly created file I called RealTurtle.txt (using Mac TextEdit) and saved it in the download area. I then copied and pasted the file into the Samples folder (and changed the AppDelegate.m file appropriately) . This time I got the error message: Nothing to execute.
I think something is happening in the Mac text editor. I have selected "Make Plain Text" from the Textedit menu. It saved it as Unicode(UTF-8). Should it have been Unicode (UTF-16) or something else? It seems that the text file is not being recognized as such.