iOS: deleting a line from a field

Graham Samuel livfoss at mac.com
Mon Apr 9 10:56:19 EDT 2012


I have found that, for me, this line of script applied to a list field where the user has selected a line:

   delete the selectedLine

works differently in the iOS environment compared to the IDE and desktop environments. In the IDE etc, the statement deletes the line and closes the gap remaining, but in iOS it doesn't close the gap but leaves a blank line! I don't know if this is a bug or one of the numerous errors I find myself making. I have anyway found a workaround, which is to replace the above script with something like this:

   put the selectedChunk into t1 -- this looks like e.g. 'char 5 to 25 of fld 4'
   add 1 to word 4 of t1 -- to include the return at the end of the line
   do "delete" && t3

Should the original script have worked?

Graham




More information about the use-livecode mailing list