So I’ve actually posted a question at the snarkhaven StackOverflow (but yes, edited my profile to leave out my comments that they’re self-sanctified twerds — I’ll put it back when … okay, if… they prove me right again).
I mean to tell ya, you tell this thing to “run” and it runs. If I say “for time one to four, delay 10 seconds between,” it will do that — and then go back to just running, forever.
Okay, there’s a command to tell it to stop. If I tell my slider to tell it to do that, I can slide and it will do that.
However, if I tell *it* to do that if my counter gets over 4, it refuses. It tells me my counter is … and it keeps getting bigger… and it just skips that line that tells it to stop. It’s the same. exact. command. I put it “outside” the loop.
I found some bizarre and convoluted functions (methods, **WHATEVER**), that Android’s supposed to have but … I’m reticent to dive into something utterly new when hey, it’s violating the rules of programming. (Which is to say, if I’m making a stupid syntax mistake that makes it look like it’s violating the rules of programming, I need to find that out, not go try something more complicated.)
I got an edit from somebody with 111 rep so I was glad to accept it — they get points for that. I’m all for elevating the lowly. And maybe s/he is hte one who voted my question as useful and clear (it’s not that researched…) so that gee whillikers, I’m up to 26 in rep… all it will take is one snarkboy to yank it, though.
howardat58
November 23, 2015
I tried to comment, this is a test comment
howardat58
November 23, 2015
So here’s the actual comment:
The test for exiting a loop must be inside the loop,
Best place is just after incrementing the counter.
xiousgeonz
November 23, 2015
Thanks — that was exactly the issue in its own way. I checked just after the counter — and then had the “handler” say “wait a few seconds,” which overrode the “check” and started it all running again. I didn’t understand the relationship between the handler and the runnable. I’m pretty sure I can’t say “for this sequence, do the runnable.” The “handler” has to tell it when to wait and when to stop so even if I say STOP! the “handler” will start it all over again.
I think I’m going to leave the “check” outside and call it, though, so that I can have different “checks” in different versions…
I got it to work **and** figured out how to get it to count down the way I wanted it to.
howardat58
November 24, 2015
I’ve been using HTML% and javascript. It took a while to get the hang of the addeventlistener thing, but the end result will run in a browser on almost any machine, laptop, tablet, smartphone…