Created my first XOJO app on OSX. Runs okay with the IDE…no errors. However, once I build it, it throws an IO Exception error immediately. The Window paints and gives the error message :IO exception error type 2. Below you’ll see the code that is on OPEN.
Dim f As FolderItem
Dim t As TextInputStream
dim strline, Pref(4),fname,lname,emailtxt,strPrdCode,strPrdcodeentered as String
f = SpecialFolder.ApplicationData.child("r4w").child("ValidationINI.txt")
'file ValidationINI.txt is the ini file for validation
If f <> Nil Then
if f.Exists Then
t = TextInputStream.Open(f)
strline = t.Readline 'read first line
Pref=strline.split(",")
If Pref(0) <>"" then strPrdCode=uppercase(Pref(0))
if ubound(Pref)>1 then
If Pref(1) <>"" then fname = Pref(1)
if Pref(2) <>"" then lname = Pref(2)
if Pref(3) <>"" then emailtxt = Pref(3)
if Pref(4) <>"" then strprdcodeentered = Pref(4)
end if
else
Msgbox "ValidationINI.txt is missing"
end if
End If
t.close
Code.text=strprdcodeentered
FN.text=fname
LN.text=lname
Email.text=emailtxt
There are other textinputstream and textoutputstream code segments in the Ok Button Action, but I suspect it’s the Open. Window has first name, last name, email address, registration code text boxes, plus an Ok button and Cancel button.
Hmmm Troubleshooting XOJO run time errors on build but not IDE run seems daunting. How do I begin?