Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BAM: How to embed your program in a web page
#7
(11-10-2022, 08:36 PM)Pete Wrote: ...


The LINE INPUT statement is a bit buggy. I typed to the edge and it left a letter on the right margin on row down as it went back to begin line-2. Behavior continued. Typed 3 lines, but backspace was only able to go back 1 line.

Pete

Yeah, that bit of wwwBASIC is pretty borked.

Something I'd like to fix eventually, but I can't stare at javascript too long before getting really cranky.

The big problem with using a canvas element: useless for virtual keyboards (mobile devices and otherwise.)  When you touch the canvas element, it is like mouse-clicking on it.  So no way to trigger the virtual keyboard, and nothing to capture input from a virtual keyboard.

My fix right now is with the BAM statements:

Code: (Select All)
_PROMPT (message, defaultValue)

_CONFIRM (message)

_ALERT (message)

Not in love with that, but it will have to do for now.

I'm thinking of having the interpreter check for and confirm touchscreen devices, and automagically redirect the normal keyboard input statements to the mobile-friendly statements at runtime, so that we can stick with QBasic/QB64PE syntax, but the interpreter will just do the magic of running the other statements instead.

Hmmm, maybe that's what I should do with LINE INPUT.  Redirect to _PROMPT all of the time...
Reply


Messages In This Thread
RE: BAM: How to embed your program in a web page - by CharlieJV - 11-10-2022, 09:03 PM



Users browsing this thread: 1 Guest(s)