Plugin generator improvement

General questions about NeoAppBuilder - our rapid application development tool for building HTML5, web and mobile apps.

Moderator: Neosoft Support

Locked
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Plugin generator improvement

Post 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
Hans-Peter
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Plugin generator improvement

Post 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?
NeoSoft Support
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Plugin generator improvement

Post 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
Hans-Peter
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Plugin generator improvement

Post by Neosoft Support »

Wouldn't the inline template elements be covered up by the page's regular elements?
NeoSoft Support
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Plugin generator improvement

Post 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
Hans-Peter
farhad2008
Posts: 62
Joined: Tue Apr 01, 2008 1:15 am
Location: usa
Contact:

Re: Plugin generator improvement

Post 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
The Words I Love You
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Plugin generator improvement

Post by Neosoft Support »

Put your JavaScript function under the Code tab. Then create an Action that calls the function. For example:

result = myfunction(inputvar);
NeoSoft Support
farhad2008
Posts: 62
Joined: Tue Apr 01, 2008 1:15 am
Location: usa
Contact:

Re: Plugin generator improvement

Post by farhad2008 »

hi,
tanks for your answer but it is not work
what is problem?
thnks

farhad
The Words I Love You
farhad2008
Posts: 62
Joined: Tue Apr 01, 2008 1:15 am
Location: usa
Contact:

Re: Plugin generator improvement

Post by farhad2008 »

sorry i was mistake
no problem
thank you very much
farhad
The Words I Love You
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Plugin generator improvement

Post by HPW »

Hello,

Some news on the newlisp-js flavor: http://www.newlispfanclub.alh.net/forum ... 7&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
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Plugin generator improvement

Post by HPW »

Hello,

Since my last test some time and betas have gone.

Now back with current beta 18_5_27 and latest newlisp-js .

One Problem:
In the plugin Generator I tell the plugin which javascript-file should be loaded. (Fileentry in the file-tab)

Then the Compiler write this line into Html Body:

Code: Select all

<script src="js/newlisp-js-lib.js"></script>
But I would need a custom load-line:

Code: Select all

<script async type="text/javascript" src="js/newlisp-js-lib.js"></script>
Can the plugin Generator improved to Support a custom load-line?

Edit: See next post for more advanced oiption

Regards
Hans-Peter
Last edited by HPW on Tue Aug 21, 2018 11:33 pm, edited 1 time in total.
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Plugin generator improvement

Post by HPW »

Hello,

More testing with the loader:

I do not only Need a custom loader line! I Need an Option to add a complete JavaScript section of code with custom loader code.
So instead of an entry in the file-tab, I would suggest a loader-code tab where I can place a JavaScript source.
Similar to the "Appvproperty/Advanced/Custom metadata/head+body tab

This is needed when I must first load a JavaScript-function to support Event handling for the async loading process.
And that is needed before the loader-line.

Regards
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Plugin generator improvement

Post by HPW »

Hello,

I placed a non-JavaScript file into the file-tab from the plugin Generator:

newlisp-js-lib.html.mem

I expect that it copied into the Project somewhere.
The JS from the same place gets copied into the JS-Sub Folder of the web Project.

The mem-files is not copied.

Not known extensions should gets copied into the Project main path.

I have to put it into "App properties/Libraries / Files". They gets copied into main-dir.

Edit: From my post of 1.1.2016
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.
So either identification on Extension or separate Tabs to get copy-target

Regards
Last edited by HPW on Tue Aug 21, 2018 11:36 pm, edited 1 time in total.
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Plugin generator improvement

Post by HPW »

Hello,

The plugin generator supports command wizards for custom commands.
It identify the type of a command parameter by the type-spezifier.

When it is set to "OBJID" the wizard gets 2 Buttons in the wizard: One for variable-select and one for object-select.

So what about a new ID "COLOR". Buttons in the wizard: One for variable-select and one for color-select.

Not sure in the moment if others make also sense.

Regards
Hans-Peter
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Plugin generator improvement

Post by HPW »

Hello,

It would be nice if the command wizards can also show the plugin-name where the command come from.

Either in caption

Action Wizard - fabNewRect (Fabric 1.7)

Or hint area:

fabNewRect (Fabric 1.7)
Adds a rectangle

Regards
Hans-Peter
Locked