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

Possibly Related Threads…
Thread Author Replies Views Last Post
  BAM Draw CharlieJV 9 1,991 11-07-2023, 10:27 PM
Last Post: James D Jarvis
Star QBJS - General Question for Web Development JamesAlexander 3 962 10-17-2023, 10:42 PM
Last Post: dbox
  BAM programs as "web services": The Pie Chart Service CharlieJV 0 432 09-08-2023, 04:06 AM
Last Post: CharlieJV
  BAM port of an old classic: "Amazing Program" (slightly BAMified) CharlieJV 1 612 08-26-2023, 06:52 PM
Last Post: CharlieJV
  Ported to BAM: David Ahl's "One Check" program ("solitaire checkers") CharlieJV 1 610 08-04-2023, 11:03 PM
Last Post: CharlieJV

Forum Jump:


Users browsing this thread: 1 Guest(s)