Page 1 of 1

how to run example independent from SpiderBasic environment

Posted: Sat Oct 20, 2018 8:59 pm
by Hadrianus
I have never made a webbased-application. :oops: I managed to run an example inside SpiderBasic. It appears inside my browser just fine. I suppose the next step is to use the compiler, but I have no idea how to do it. It seems that the compiler generates 2 kind of files, one of them is called Jscript. There is no explanation in the manual how to get this work inside your browser without running SpiderBasic at the same time. My main purpose is not to write websites, but simply write some webbased applications which I can run inside my browser without running SpiderBasic.

Re: how to run example independent from SpiderBasic environm

Posted: Sun Oct 21, 2018 5:26 am
by HPW
Hello,

You choose "Compiler/Create App" and in the web-tab you set your main html-file in field "Html filename".

That file and folder gets created with a sub-Folder "Spiderbasic".

Your main-file can then be started with Firefox locally for example.
Or copy all to your web-Server.

Regards

Re: how to run example independent from SpiderBasic environm

Posted: Sun Oct 21, 2018 9:30 am
by Hadrianus
HPW wrote:Hello,

You choose "Compiler/Create App" and in the web-tab you set your main html-file in field "Html filename".

That file and folder gets created with a sub-Folder "Spiderbasic".

Your main-file can then be started with Firefox locally for example.
Or copy all to your web-Server.

Regards
It does not work at all.

Indeed it creates a Jscript file named spiderbasic. If a press on this file I received a runtime error. If I moved this file to an open Firefox window I get hundreds lines of text, but not the example itself.

Further it created indeed another file, but not html. It's a very small file and my computer doesn't recognize when a click on this file.

Anyway thank you for your reply.

Re: how to run example independent from SpiderBasic environm

Posted: Sun Oct 21, 2018 10:23 am
by munfraid
A SpiderBasic web application is not a single executable file like in PureBasic or other languages. Your app is exported into a folder which contains all the files required to run your app. Just follow these steps:

1. In the editor choose from 'compiler' menu 'Create App'

2. In the field "HTML filename" put the path of your destination folder.

3. Check "Copy SpiderBasic libraries" - so all required files will be exported to your folder. This has to be done only once. When you make changes in your app later, you can uncheck it to make the export faster.

4. Go to your export folder and run your exported file.

If you want to run your app online from a web server you have to upload the complete folder.

Re: how to run example independent from SpiderBasic environm

Posted: Sun Oct 21, 2018 12:29 pm
by Hadrianus
munfraid wrote:A SpiderBasic web application is not a single executable file like in PureBasic or other languages. Your app is exported into a folder which contains all the files required to run your app. Just follow these steps:

1. In the editor choose from 'compiler' menu 'Create App'

2. In the field "HTML filename" put the path of your destination folder.

3. Check "Copy SpiderBasic libraries" - so all required files will be exported to your folder. This has to be done only once. When you make changes in your app later, you can uncheck it to make the export faster.

4. Go to your export folder and run your exported file.

If you want to run your app online from a web server you have to upload the complete folder.
Thank you Munfraid. Indeed I have to copy the necessary libraries inside the folder of the testapplicaton. I discoverd also that the small created file, which is not recognized by windows, is the necessary file to open in Firefox. I suppose that it needs also the created Jscriptfile inside the folder.

Re: how to run example independent from SpiderBasic environm

Posted: Sun Oct 21, 2018 1:20 pm
by Peter
Hadrianus wrote:Indeed I have to copy the necessary libraries inside the folder of the testapplicaton.
No, you don't have to. SpiderBasic does that for you when you create a webapp:

Image

Then load the index.html into your Browser:

Image

Image

Re: how to run example independent from SpiderBasic environm

Posted: Sun Oct 21, 2018 2:25 pm
by Hadrianus
Thank you Peter.

So you have to add .html by yourself at the filename. :shock:
And in that case you only have to click in order to start the browser.

Re: how to run example independent from SpiderBasic environm

Posted: Sun Oct 21, 2018 3:06 pm
by Peter
Hadrianus wrote:So you have to add .html by yourself at the filename. :shock:
And in that case you only have to click in order to start the browser.
correct! :-)