how to run example independent from SpiderBasic environment

Just starting out? Need help? Post your questions and find answers here.
Hadrianus
Posts: 4
Joined: Sat Oct 20, 2018 8:38 pm

how to run example independent from SpiderBasic environment

Post 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.
HPW
Posts: 35
Joined: Thu May 04, 2017 4:25 pm

Re: how to run example independent from SpiderBasic environm

Post 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
Hadrianus
Posts: 4
Joined: Sat Oct 20, 2018 8:38 pm

Re: how to run example independent from SpiderBasic environm

Post 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.
munfraid
Posts: 104
Joined: Sat Mar 24, 2018 1:33 pm

Re: how to run example independent from SpiderBasic environm

Post 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.
Hadrianus
Posts: 4
Joined: Sat Oct 20, 2018 8:38 pm

Re: how to run example independent from SpiderBasic environm

Post 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.
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: how to run example independent from SpiderBasic environm

Post 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
Hadrianus
Posts: 4
Joined: Sat Oct 20, 2018 8:38 pm

Re: how to run example independent from SpiderBasic environm

Post 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.
User avatar
Peter
Posts: 1086
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: how to run example independent from SpiderBasic environm

Post 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! :-)
Post Reply