Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BAM: download it, run it locally, store it anywhere
#1
Project Website

Reply
#2
OK I am trying this, have the HTML file in my Downloads folder and am testing a mod of New Program which already had the first line (see below).
I named "Hello 2" and it saved fine to the BAM app folder in HTML file.

but this only runs the first line and is done:
Code: (Select All)
PRINT "Hello World!"
INPUT "What is your name? ";name$
PRINT "Hello ";name$

Does BAM not have Input? but no errors are reported either.

What am I doing or thinking wrong?
b = b + ...
Reply
#3
(05-22-2023, 02:19 PM)bplus Wrote: OK I am trying this, have the HTML file in my Downloads folder and am testing a mod of New Program which already had the first line (see below).
I named "Hello 2" and it saved fine to the BAM app folder in HTML file.

but this only runs the first line and is done:
Code: (Select All)
PRINT "Hello World!"
INPUT "What is your name? ";name$
PRINT "Hello ";name$

Does BAM not have Input? but no errors are reported either.

What am I doing or thinking wrong?

Web browser pages will not accept keyboard input (or play sounds) until the page has keyboard focus.

So you have to click on the screen of the running application to give it the focus.

It is a good idea to untick the "Autostart this program" feature, which will require putting focus on the program's browser window before the program starts.

Via the Project menu, "Run-Time Properties" menu item:

   
Reply
#4
(05-22-2023, 02:19 PM)bplus Wrote: OK I am trying this, have the HTML file in my Downloads folder and am testing a mod of New Program which already had the first line (see below).
I named "Hello 2" and it saved fine to the BAM app folder in HTML file.

but this only runs the first line and is done:
Code: (Select All)
PRINT "Hello World!"
INPUT "What is your name? ";name$
PRINT "Hello ";name$

Does BAM not have Input? but no errors are reported either.

What am I doing or thinking wrong?

BTW, this intricate program works A-1 after unclicking that autostart feature:

   
Reply
#5
Dang! My Hello 2 program disappeared??
b = b + ...
Reply
#6
(05-22-2023, 03:40 PM)bplus Wrote: Dang! My Hello 2 program disappeared??

Did you not save BAM to overwrite the previously downloaded one?
Reply
#7
(05-22-2023, 04:03 PM)CharlieJV Wrote:
(05-22-2023, 03:40 PM)bplus Wrote: Dang! My Hello 2 program disappeared??

Did you not save BAM to overwrite the previously downloaded one?

About "Save"

   

BAM (the IDE, the tools, everything) and programs all exist in one HTML file.

That "Save" button works like like "Save As" in wordprocessors/etc.  It is meant to take BAM in its current state (settings, programs, everything) and save it to overwrite the previous HTML file or save it to a new file (backup/archive/versioning/whatever.)

(In reality that "Save" button does a download of BAM as it is in its current state.  I just think of it as "Save As".)

So when you open your local instance of BAM and enter a new program, you save the whole kit and caboodle over the previous file or to a new file.

As any javascript running in a web browser, it has no access to the file system (and it should never have access to the file system.)   So no autosaving, all manually done (as a download/save-as).

Good grief, I think I'm spinning in circles trying to explain all of that ...  Easy to do day in and day out, but I'm having a devil of a time explaining it.
Reply
#8
After getting Hello 2 back in and Saved I got 2 now: Hello 2 and Hello 2 1 ?

What I get when try to save is this confusing Dialog:
   

Also confused between Run under development which works,
and Run under Production which doesn't:
   
b = b + ...
Reply
#9
Well now Hello 2 1 has disappeared, in that one I had comment at end to track the modified version.

When I click top left circle with check I get a whole new giant HTML file along with the old.
Do I have to delete all the old Html's every time I save a mod in an app in BAM.

Really confused here, not working like a normal IDE.
b = b + ...
Reply
#10
(05-22-2023, 06:50 PM)bplus Wrote: Also confused between Run under development which works,
and Run under Production which doesn't:

When you create a new program, it is based on the New.BAS program.  It will get the name "New 1.BAS" or whatever digit that is after the last existing one.

Your new program will be a simple hello world program (copied from new.bas), and will be instantly in the "production" promotion level.

Now is a good time to rename the program.  Use "File" Save As, click "rename", enter the new name, and click OK.  (If you wanted to "Save As" with the "copy" option, that creates a new program as a copy of your current program with the entered name, and then opens that new program.)

Keep in mind:  that "Save As" does not save to your device's file system.  That is just making changes to the BAM instance that is currently in your browser.  Eventually, you need to press that save button (that button in the top-ish left corner) to save everything to your file system.

The second you start editing a program, the program goes from "production" promotion level to "development".  You then have two versions of your program: the current production version and the current development version.

You can compare the development version to the production version at any time to see progress/differences.

When you are happy with your development version, promote it (via the menu item under project) to production level (as in your are done your changes, and you are replacing the previous production code with the development code your are happy with.

Apologies, I have to cut it short there.  Gots to get back to work.
Reply




Users browsing this thread: 4 Guest(s)