Problem with print...

I’ve built a little sprite editor to kick out the Set statements for building small (up to 64x64 pix) images. Everything is finished, except I can’t get the print statement to cooperate. It seems that any print within nested if statements locks up Codea. For example…

for x = 1, 32 do
print(x)
end

Works just fine, but this code…

for x = 1, 32 do
for y = 1, 32 do
print(y)
end
end

Brings the system to a halt.

Is there something I’m missing here? I’d like to put Spritely out there, but without being able to print the results the value is limited.

Thanks.

Print() is REALLY REALLY slow. How long did you wait? I’ve had code where I had to wait 10+ seconds for it even to start because of the print() statements.

It locks up solid for a matter of minutes without even producing any output.

I can walk the array with if-thens (painfully) and print the results, but nested if-loops = dead print.

I worked around it by just unfolding the array into a single dimension stream. It’s messy, but it works.

Hmm I’ll have to change the way print works so that it doesn’t immediately modify the output buffer, and instead buffers results to change at the end of the frame.