Script not accepting empty line
    Rob Cozens 
    rcozens at pon.net
       
    Thu May 27 09:54:35 EDT 2004
    
    
  
>I don't know if this will help in your case, but as a general rule, 
>using a "repeat for each" loop is much faster.
Sarah,
Aren't there possible issues if one changes the contents of the 
control variable inside a "repeat for each" structure?  For repeat 
for each to work in this case wouldn't one need to make a copy of the 
control variable for the repeat & make changes to the original?:
on fillBlanks variableList
   put 0 into lineNumber
   get variableList
   repeat for each line theLine in it
     add 1 to x
     if theLine is empty then put [whatEver] into line x of variableList
   end repeat
end fillBlanks
>This script will add data to lines 1 to 10 but then when lines are 
>emptied only line 10 will fill back up.
Jeremy,
What you are trying to do should work.
Can you show us the handler that empties a line and the exact 
Transcript for Add_New?
-- 
Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.info/who.htm
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
    
    
More information about the use-livecode
mailing list