Creation pluguins - Forum

Forum Navigation
You need to log in to create posts and topics.

Creation pluguins

Hello I am Francisco  a new member of the forum.

I wanted to take this opportunity to greet everyone and thank you for sharing your creations and time.

I just landed with visualneo web,  and would like to create a plugin, is there a  pluguin manual ?

Thank you.

Vadim has reacted to this post.
Vadim

Hi Francisco (@tuevision), and welcome to the forum and to VisualNEO Web!
There is not any manual yet on how to create a plugin but some of the included plugins come with their source code.
Take a look for example at this folder in your computer: "My Documents/VisualNeoWeb/PlugIns/DateTime".
Let me know if you have any doubt.

Thank you!

Vadim has reacted to this post.
Vadim

Thanks

Hola @luishp,

Una vez creada una función  en VisualNeo para convertirla en un pluguin qué procedimiento se ha  de seguir. He estado consultando la documentación y no he sido capaz de encontrarlo.

Y otra duda. Para usar funciones de una librería javascript desde VisualNeo  cómo debo proceder.

Gracias por tu tiempo.

Roger

 

 

 

 

@rrey:

Once a function has been created in VisualNeo to convert it into a plugin, what procedure should be followed? I have been consulting the documentation and have not been able to find it.

It is extremely simple ...

1) say you have built a function (subroutine) that you call in this way ...

myAreaCircle "[radius]" "[result]"

... the subroutine would be defined to have two parameters.

2) In order to turn the function into a plugin command, you use Tools >>> Plugin Generator ... and just like building the subroutines, you ...

- define the plugin command with the same parameters (I suggest you use a different prefix for the plugin command e.g. reyAreaCircle)
- copy the code from the subroutine to the plugin code area
- save the plugin and compile it
- test it by changing the calling code to reyAreaCircle "[radius]" "[result]"

... voila, you are a certified plugin developer !!!

And another doubt. To use functions of a javascript library from VisualNeo how should I proceed.

This one is a bit more complex to explain ... because it depends on the interface offered by the developer of the javascript library ... so, best to ask about a specific library.

@gaev  Thank you very much for your help and for your time.

Hello  @gaev  ,

I have created the plugin. I have copied into function code. But where do I copy the function parameters?

@rrey

I have copied into function code. But where do I copy the function parameters?

Within the Plugin Generator, when you ...

- click on Add Action
- give it a name

... you will have two panels on the right ...

- the top one with the Tab called Template
- the bottom with Tabs for Parameters and Hint

The bottom panel is similar to the one you have for Subroutines.

There is a note at the bottom of the top panel that says that (for efficiency) you should place a one line call to your code (in the code section) ... but in the past, when I developed the Tabs plugin), I placed the entire code (for each command) in the associated Template section.

If you want to follow the efficiency guidelines, with permission from @luishp, I can send you (upload here) a copy of the source for neoGSheets plugin (that I am helping to add a new plugin command) ... this plugin follows the efficiency guidelines.

@rrey please take a look at the included "Date & Time" plugin. You will find the source code in the same folder. I think it's easy enough to understand how plugins work. Will try to record a tutorial as soon as I can find some time (very busy lately).
@gaev feel free to share the neoGSheets source code plugin here, although we are still working on it and it's a bit complex to understand how it works.
Thanks!

@rrey:

Here is the source code for the (in progress) version of neoGSheets plugin ... along with the associated javascript library ... it has a slightly different format than the Date & Time plugin.

Uploaded files:
  • You need to login to have access to uploads.

@gaev Thank you very much. I will study it

@gaev Thank you very much. I will study it

Quote from luishp on June 27, 2020, 7:53 pm

@rrey please take a look at the included "Date & Time" plugin. You will find the source code in the same folder. I think it's easy enough to understand how plugins work. Will try to record a tutorial as soon as I can find some time (very busy lately).
@gaev feel free to share the neoGSheets source code plugin here, although we are still working on it and it's a bit complex to understand how it works.
Thanks!

@luishp En el ejemplo que has presentado el código está en javascript y lo he entendido bien. Pero cuando el código es neoscript cómo se ponen las funciones? En tu ejemplo en el espacio code están todas las funciones (function...return). Pero en al usar neoscript ¡cómo se separan las funciones?

@rrey los plugins solo pueden programarse en JavaScript. No es posible hacerlo en NeoScript.

Plugins can only be programmed in JavaScript. It is not possible to do it in NeoScript.

@rrey ... oops ... I just realized that all my plugins were developed with Javascript ... sorry if I misled you earlier.

There are Javascript ways to perform the same logic as NeoScript commands (albeit using a more complex syntax) ... if you have difficulty with some of them, post your inquiries here for assistance.