putting a relative large amount of data into a field
wouter
wouter.abraham at pi.be
Wed Jun 25 09:08:01 EDT 2003
Goodmorning everybody,
Just a small question. Did anybody encounter the following problem?
If a "relative" large amount of data contained in a variable is put
into a field, the field doesn't show all the data although it seems to
be present.
To force all the data in the variable to be seen in the field, one has
to copy it to the field in smaller chunks.
I tested the following scripts on several computers in the vicinity
(only OS X and that's the why of the question) and they all showed the
same problem.
(the scripts give a different mileage in Revolution and Metacard,
although they use the same engine)
on mouseUp
put "" into fld "output"
lock screen
repeat with i = 1 to 10000
put i & ", " after b
end repeat
delete last char of b
put b into fld "output"
select after fld "output"
put the number of items in fld "output"
end mouseUp
If put i & ", " after b is changed to put i & space after b
it gives a different amount of output in the field
(for the ease of copy-pasting):
on mouseUp
put "" into fld "output"
lock screen
repeat with i = 1 to 10000
put i & space after b
end repeat
delete last char of b
put b into fld "output"
select after fld "output"
put the number of words in fld "output"
end mouseUp
To force all data to show in the field :
on mouseUp
lock screen
put "" into fld "output"
repeat with i = 1 to 10000
put i & space after b
end repeat
get the number of chars in b
put it / 1000 into mtimes
put it mod 1000 into theRemainder
put 1 into theStart
repeat with i = 1000 to mtimes * 1000 step 1000
put char theStart to i of b after fld "output"
add 1000 to theStart
end repeat
if theRemainder <> 0 then put char theStart to (i + theRemainder) of
b after fld "output"
select after fld "output"
end mouseUp
(If I tried to put the numbers 1 to 15000 then I had to force quit
because of the dreaded colored spinning ball in OS X)
Thank you and have a nice day
WA
More information about the use-livecode
mailing list