I have the below code which is taking the contents of a file, placing it in a variable then using that to populate a button.
when the selection is pressed that is then placed into the label of the button.
Problem is, when ever any line that ends in 0 is pressed IE 10,20,30 it is exiting the handler because of the 0 behind the leading number.
I have tried adding in the wholematches command but the error still occurs.
any ideas?
Code: Select all
if the environment is not mobile then exit mouseDown
put specialfolderpath(documents) & "/pilots.dat" into thePath
put url ("file:"& thePath) into tList
iphonePick (tList)
put the result into tResult
set the wholematches to true
if tResult contains "0" then exit mouseDown
if tResult is not empty then
put "ID=" & word 3 of line tResult of tList into line 1 of fld "ScoreRunS1"
set the label of btn "PilotID" to line tResult of tList
set the filename of image "PilotImage" to specialfolderpath("documents") & "/" & word 3 of line tResult of tList & ".png"
end if