Page 1 of 1

Plugin generator improvement

PostPosted: Thu Dec 31, 2015 9:11 am
by HPW
Hello,

Great improvments with the latest release.
So i dig in again and give it a try with a newlisp plugin.
So far it works but not without some hand-corrections in the resulting html.

The neoappbuilder generates such a line in the index.html to include a js-lib:
<script src="js/newlisp-js-lib.js"></script>
The js-file is found by the infomation in the fies tab in the plugin-generator.

For most js-libs this line might be enough to include the lib.
The newlisp-js needs more than a one-liner to load correctly (big emscripten compiled lib)

So what about a new tab in plugin-generator called 'Include template'
There the plugin author can place a multiline html source which is inserted in the html-target on compile instead of the standard one-liner.
When nothing is set, the Standard one-liner is written.

Edit: It would be an option to set a filename for a 'include template' file.

Regards

Re: Plugin generator improvement

PostPosted: Thu Dec 31, 2015 5:19 pm
by Neosoft Support
Good idea. Do you think we should include different sections for JavaScript and CSS templates since they are inserted into different locations in the HTML.

Are there other modifications to the HTML that plugins might need in addition to this?

Re: Plugin generator improvement

PostPosted: Fri Jan 01, 2016 1:21 am
by HPW
Yes, an optional CSS-template will be a logical addition.

>>Are there other modifications to the HTML that plugins might need in addition to this?

Yes, rename the files-tab of the to 'JS-Files' and add another one 'Main-Files'.
Files from tab 'Main-Files' get copied into the main Folder where index.html is generated.

Another wish would be to have a sort of inline-Html into first page.
Sample:
Code: Select all
<div id="NewPage">
    <div class="emscripten" id="status">Downloading...</div>
    <div class="emscripten">
      <progress value="0" max="100" id="progress" hidden=0></progress>
    </div>

The indented lines would be from the inline-template.
The objects would show up during asyncronus script loading.

Regards

Re: Plugin generator improvement

PostPosted: Sat Jan 02, 2016 10:36 pm
by Neosoft Support
Wouldn't the inline template elements be covered up by the page's regular elements?

Re: Plugin generator improvement

PostPosted: Sat Jan 02, 2016 11:06 pm
by HPW
In my sample it uses empty space above the first visible object and disapper after loading.
See the test-link I send via PM.
The link was tested on:

IE11,Chrome,Firefox,Samung S3+5 mini

Lutz Mueller (newlisp author) tested on iphone 6S,ipad mini and mac.

Regards

Re: Plugin generator improvement

PostPosted: Sat Apr 16, 2016 2:52 am
by farhad2008
hi,
how do define a var to return sum of function? in plugin generator
for example :
function myFunction(p1, p2) {
return p1 * p2;
}
i need get sum of myfunction in neoappbuilder variable
thanks
farhad

Re: Plugin generator improvement

PostPosted: Sat Apr 16, 2016 5:42 pm
by Neosoft Support
Put your JavaScript function under the Code tab. Then create an Action that calls the function. For example:

result = myfunction(inputvar);

Re: Plugin generator improvement

PostPosted: Sun Apr 17, 2016 4:05 am
by farhad2008
hi,
tanks for your answer but it is not work
what is problem?
thnks

farhad

Re: Plugin generator improvement

PostPosted: Sun Apr 17, 2016 4:09 am
by farhad2008
sorry i was mistake
no problem
thank you very much
farhad

Re: Plugin generator improvement

PostPosted: Sun Jun 25, 2017 2:10 am
by HPW
Hello,

Some news on the newlisp-js flavor: http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=2&t=4467&start=75
Now there is a optional WebAssembly version of newlisp-js.
http://webassembly.org/
Tested with current Firefox and Chrome. Chrome shows a signifikant Performance improvement.
Edge with experimetal JavaScript Support enabled still throw an error.
Maybe we will see WebAssembly Support on all important Browsers in the future.

Regards