anyone seeing a bug with for each and split when combined?
Ken Ray
kray at sonsothunder.com
Fri Nov 28 12:34:17 EST 2003
Phil,
Try copying the value from the variable in "repeat for each" to a new
variable; it is documented that attempting to change a "for each"
variable can cause odd behavior. So try this:
repeat for each line tLine in tData
put tLine into tLineData
split tLineData using "="
...
(etc.)
end repeat
HTH,
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
> Phil Jimmieson
> Sent: Friday, November 28, 2003 8:22 AM
> To: use-revolution at lists.runrev.com
> Subject: anyone seeing a bug with for each and split when combined?
>
>
> Hi folks,
> Using Rev 2.1.2 and OSX 10.3 I'm seeing the following odd
> behaviour: I have a text file which contains
> name=value1=value2 triples. I'm
> reading the whole file in and placing the file into a variable
> "temp", then using "repeat for each line" to get the lines, then
> splitting them using "=". This no longer seems to work reliably. If I
> let it run, some lines from the file don't get processed properly (or
> at least, they fail to split). If I run it under the debugger, it
> seems to work more reliably (depending on where I place the
> breakpoint). It's almost as though every other line is being
> junked. I changed the code to so as to put the number of
> lines of temp into
> another variable, and use a "repeat with"instead, putting each
> specific line of temp into a variable myself, and then doing the
> split. This works perfectly.
> Anyone else seeing this? It seems to have started happening
> only recently.
>
> --
> Phil Jimmieson phil at csc.liv.ac.uk (UK) 0151 794 3689
> (Mobile) 07976 983164 Computer Science Dept., Liverpool
> University, Chadwick Building, Peach Street
> Liverpool L69 7ZF http://www.csc.liv.ac.uk/~phil/
> I used to sit on a special medical board... ...but now I
> use this ointment. _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-> revolution
>
More information about the use-livecode
mailing list