next repeat problem

Rich Lague laguer at ucs.orst.edu
Tue Aug 17 11:13:17 CDT 2004


I'm trying to get rid of blank lines in a global variable by using the 
"next repeat" control structure to stop them from being put into the 
variable in the first place. I keep getting errors-- but only when I 
include the "next repeat" line. Here is the script:

on upDateTopicsRequest
   global theList, order, theListPlus, currentListNam

   put empty into theList
   ask "Would you like to save your current list?"
   if it is empty then beep
   else
     put it into field "listName"
     put it into currentListNam

     set the itemDelimiter to tab
     repeat with i = 1 to the number of lines in field "daTable"
       if  line i is empty then next repeat
       put item 1 of line i of field "daTable" & return after theList
     end repeat
     put the number of lines of theList into order
     put field "daTable" into theListPlus --extract the descriptors in 
productEval stack

   end if

end upDateTopicsRequest


	"daTable" is a table field. If I exclude the "next repeat" line I do 
not get an error, but I get a lot of blank lines in the global variable 
"theList". This, in turn, causes other problems down the line. The 
error I get when I hit the "Apply" button is "if missing 'then'.
	Is there a better way of excluding the blank lines in the field 
"daTable" from my global variable?

Thanks,

Rich Lague



More information about the use-livecode mailing list