Open hx2A opened 1 week ago
Wait, let me check this... looks the same to me! could it be platform dependent?
Isn't this the expected behavior? I checked also on Processsing Python mode (I used to have a page about this).
My expectation was fulfilled that that no_loop()
inside setup()
would let draw()
run once and then stop. And then, no_loop()' inside
draw()` fill prevent it from running again.
@villares , no you are right. I took another look and I see it works correctly for imported mode and module mode. I was running this with Live Coding, and the problem is how Live Coding handles no_loop()
. Calling that in setup()
means it does not call draw()
a single time. My initial conclusion was based on my incorrect assumption that the Live Coding feature handled no_loop()
correctly, and was the same as what I'd get with the python interpreter.
So this is a bug, it is just a bug with Live Coding, not module mode / imported mode.
And this means I found a bug in the release minutes after doing the release. 😞
Oh, I see, but don't let this spoil the joy of a great new release my friend!
Oh, I see, but don't let this spoil the joy of a great new release my friend!
Ha, these kinds of things come with the territory. It will probably be an easy fix. :)
Ha, these kinds of things come with the territory. It will probably be an easy fix. :)
Nope. Not easy either.
From discussion https://github.com/py5coding/py5generator/discussions/545
I tried converting @vsquared 's code to module mode and found it did not work:
The call to
no_loop()
insetup()
causes thedraw()
function to never execute. I think how module mode handles this is correct; imported mode execution should not execute thedraw()
function.