fapnip wrote: Mon Aug 02, 2021 2:27 amI'm not sure. I would think the timer's event would execute last, even if it was defined first, but I've set the pcm2 evals to float to the top in v0.2.10 n case something is allowing the timer event to run before the evals get a chance to be executed. Let me know.
I'm going to have to think about how to test this, because I'm not really sure. Though I don't think it should ever break anything to do what you said you're doing.
It may be that I've had too many Mojitos, but guess I'm still not wrapping my head around how to see the issue. Could you give me exact steps to reproduce the issue in a tease converted with v0.2.10, and how to see the issue working correctly in the original? Like: "jump to page x, click y, you should see z, but instead you're seeing n."
-Go to the tease "Estim Distraction" as linked above.
-Click through normally until reaching the difficulty selection.
-Select "Easy" difficulty.
-Click buttons at random on the following pages.
--In the original, the page this takes you to will start with 3001 and increase one at a time with every click until reaching 3020, then it will always go to 3020. (Unless your random clicking gets a page where you're supposed to click and you click the right answer... I think that's something like a 1 in 40 chance, so don't worry about it.)
--In the new conversion... er, this seems to behave differently in different browsers. In Firefox, things appear to work as they should. In Chrome... it's weird. I've had it repeat 3001 multiple times, then 3002, 3003, drop back to 3002, 3005 a couple times in a row, drop to 3004...
--And now firefox is doing the same thing???
Okay, I edited the javascript to log the contents of candidates before going to a range, so it's possible to see what's happening. Things seem to work sometimes - if you choose weak difficulty, 109 seems to get set pretty consistently. (Which disables showing the ones where you're supposed to click a button. That difficulty also makes the tease freeze if you push a button, but that's not the fault of your conversion.) But when you select any other difficulty and click something you're not supposed to, the range done by poolclick gradually gets larger.
What it looks like to me is that the actual set and unset commands are now working (which they weren't on the version I'd tested previously), but you still aren't automatically running set on every page that's visited. So pages that are supposed to no longer be eligible for a visit are staying in the list.
This also breaks the behavior of the pages such as poolbryci, which if visited repeatedly should show each page from 2001 to 2020 once each (in random order), then when each has been seen once go to page 2000, which goes to page resetbryci, which unsets them all and goes back to poolbryci. But with visited pages not automatically being set, that doesn't work... and 2000 is showing up in the pool of candidates to start with, which means the must handling is apparently broken as well.
Adding a call to doSet to the handlePage function fixes most of that, but must still seems to be broken, so the range called from poolbryci will reset before it's supposed to. Not a big deal in this case, but not working as intended.