Quote from Ronnie on June 7, 2019, 8:29 amHi,
I'm new to creating plugins for VisualNeo Web... so testing them but stuck midway as I'm relatively new to Javascript.
I managed to find a Lunar Calendar js script (https://jsfiddle.net/DerekL/mGXKX/) and wanted to create a plugin to call the below function...
function getLunarDate(date) { var y = +Intl.DateTimeFormat("zh-TW-u-ca-chinese", { year: "numeric" }).format(date).match(/\d+/)[0], m = +Intl.DateTimeFormat("zh-TW-u-ca-chinese", { month: "numeric" }).format(date).match(/\d+/)[0], d = +Intl.DateTimeFormat("zh-TW-u-ca-chinese", { day: "numeric" }).format(date).match(/\d+/)[0], ....In the plugin, the action for getLunarDateE is
result = getLunarDate(d1);On VisualNeo Web, I tried executing but got either wrong answer of invalid results
GetLunarDateE "2019-06-07" "[Result]"How do I pass the date variable "2019-06-07" to the JS script?
Any advice is appreciated... thanks
Hi,
I'm new to creating plugins for VisualNeo Web... so testing them but stuck midway as I'm relatively new to Javascript.
I managed to find a Lunar Calendar js script (https://jsfiddle.net/DerekL/mGXKX/) and wanted to create a plugin to call the below function...
function getLunarDate(date) {
var y = +Intl.DateTimeFormat("zh-TW-u-ca-chinese", {
year: "numeric"
}).format(date).match(/\d+/)[0],
m = +Intl.DateTimeFormat("zh-TW-u-ca-chinese", {
month: "numeric"
}).format(date).match(/\d+/)[0],
d = +Intl.DateTimeFormat("zh-TW-u-ca-chinese", {
day: "numeric"
}).format(date).match(/\d+/)[0],
....
In the plugin, the action for getLunarDateE is
result = getLunarDate(d1);
On VisualNeo Web, I tried executing but got either wrong answer of invalid results
GetLunarDateE "2019-06-07" "[Result]"
How do I pass the date variable "2019-06-07" to the JS script?
Any advice is appreciated... thanks

Quote from luishp on June 7, 2019, 12:35 pmHi @ronnie,
Please download the attached file with a compiled plugin, plugin source code and a sample app.
Note that I have modified the original function to convert a string to a JavaScript date format.
Let me know if you have any doubt.
It's great to see you interested in VisualNEO Web plugins development!
Best regards.
Hi @ronnie,
Please download the attached file with a compiled plugin, plugin source code and a sample app.
Note that I have modified the original function to convert a string to a JavaScript date format.
Let me know if you have any doubt.
It's great to see you interested in VisualNEO Web plugins development!
Best regards.
Quote from Ronnie on June 7, 2019, 3:57 pmHi @luishp
Thanks for providing the sample code - will check it out. It'll help to understand the interfacing syntax properly. Yes, am exploring on plugins and learning VisualNeo Web concurrently. Do appreciate the time taken on the sample code.Rgds
Ronnie
Hi @luishp
Thanks for providing the sample code - will check it out. It'll help to understand the interfacing syntax properly. Yes, am exploring on plugins and learning VisualNeo Web concurrently. Do appreciate the time taken on the sample code.
Rgds
Ronnie
Quote from Ronnie on June 7, 2019, 5:35 pmHi @luishp
While there is no error in the attached sample code, the result was wrong.
When "2019-06-07" is entered, the sample code shows result as "壬寅年六月初七"
The correct result should be "己亥年五月初五"
to try out, add the "2019-06-07" date to below string in https://jsfiddle.net/DerekL/mGXKX/ and then click Run on the top left menu... to update/recalculate
document.body.innerHTML = getLunarDate(new Date("2019-06-07"));
Hi @luishp
While there is no error in the attached sample code, the result was wrong.
When "2019-06-07" is entered, the sample code shows result as "壬寅年六月初七"
The correct result should be "己亥年五月初五"
to try out, add the "2019-06-07" date to below string in https://jsfiddle.net/DerekL/mGXKX/ and then click Run on the top left menu... to update/recalculate
document.body.innerHTML = getLunarDate(new Date("2019-06-07"));

Quote from luishp on June 7, 2019, 7:11 pmHi @ronnie,
That's not my fault. Please don't use the "Run" button to test the app and use one of the installed Web Browsers instead (except Internet Explorer). The Run button uses Internet Explorer to run the program and it has it's own way to parse dates and probably the function you are using is not compatible with it.
A plugin like this one takes about 10 minutes or less to be ready :)Regards.
Hi @ronnie,
That's not my fault. Please don't use the "Run" button to test the app and use one of the installed Web Browsers instead (except Internet Explorer). The Run button uses Internet Explorer to run the program and it has it's own way to parse dates and probably the function you are using is not compatible with it.
A plugin like this one takes about 10 minutes or less to be ready :)
Regards.
Quote from Ronnie on June 8, 2019, 2:46 amHi @luishp
Yeah... you're right. Trying out using other browsers like Chrome and FireFox are OK, and the correct results are displayed. Using both Chrome and Safari on iPhone is OK, and as well as Chrome on Android is OK. As you've said, it's IE related issues which also affected the compiled EXE as well. Alternative is to relook at other source and try them out to ensure all browsers and compiled EXE produce identical results.
Meanwhile, a feedback... when compiled with 'minify source' ticked for Web Application, and 'Compress and encrypt app content' ticked for EXE, the screen is blank when run/launched. For the Web, whether it's in local system or run from URL, the page is blank. But when I unticked the minify or compress option, it works fine.
Rgds
Ronnie
Hi @luishp
Yeah... you're right. Trying out using other browsers like Chrome and FireFox are OK, and the correct results are displayed. Using both Chrome and Safari on iPhone is OK, and as well as Chrome on Android is OK. As you've said, it's IE related issues which also affected the compiled EXE as well. Alternative is to relook at other source and try them out to ensure all browsers and compiled EXE produce identical results.
Meanwhile, a feedback... when compiled with 'minify source' ticked for Web Application, and 'Compress and encrypt app content' ticked for EXE, the screen is blank when run/launched. For the Web, whether it's in local system or run from URL, the page is blank. But when I unticked the minify or compress option, it works fine.
Rgds
Ronnie

Quote from luishp on June 8, 2019, 9:22 amHi @ronnie,
Meanwhile, a feedback... when compiled with 'minify source' ticked for Web Application, and 'Compress and encrypt app content' ticked for EXE, the screen is blank when run/launched. For the Web, whether it's in local system or run from URL, the page is blank. But when I unticked the minify or compress option, it works fine.
You are right. The "minify" algorithm has a problem when trying to compress certain characters combinations. I have also observed it. Will try to take a look at it.
Thanks!
Hi @ronnie,
Meanwhile, a feedback... when compiled with 'minify source' ticked for Web Application, and 'Compress and encrypt app content' ticked for EXE, the screen is blank when run/launched. For the Web, whether it's in local system or run from URL, the page is blank. But when I unticked the minify or compress option, it works fine.
You are right. The "minify" algorithm has a problem when trying to compress certain characters combinations. I have also observed it. Will try to take a look at it.
Thanks!
Quote from Ronnie on June 9, 2019, 9:11 amHi @luishp
Thanks. Am getting excited about creating plugins. Managed to resolve the inconsistencies of the Lunar Calendar script on various browsers, by using a different source scripts.
Rgds
Ronnie
Hi @luishp
Thanks. Am getting excited about creating plugins. Managed to resolve the inconsistencies of the Lunar Calendar script on various browsers, by using a different source scripts.
Rgds
Ronnie
Quote from Ronnie on July 1, 2019, 7:50 am@luishp
Just one question - are the 'compiled' plug-in encrypted or obfuscated? I've been checking out and found it much easier (and faster) to add function-like codes in plugin than direct in VisualNeo Web. Still far to go for me to release any plugin but need to know its status whether the plugin is protected.
Thanks...
Regards, Ronnie
@luishp
Just one question - are the 'compiled' plug-in encrypted or obfuscated? I've been checking out and found it much easier (and faster) to add function-like codes in plugin than direct in VisualNeo Web. Still far to go for me to release any plugin but need to know its status whether the plugin is protected.
Thanks...
Regards, Ronnie

Quote from luishp on July 2, 2019, 5:36 amHi @ronnie,
Plugins code will be added minimized and mixed with the one present in other plugins (only when needed)
Additional libraries, added as files in the plugin, will be copied as they are. There is not obfuscation of any kind by default but it is possible to obfuscate it, if you want, previously to plugin deployment. Right now there is not a tool to facilitate the process.
Anyway, in my opinion, client side obfuscate source code is really easy to unobfuscate.Regards.
Hi @ronnie,
Plugins code will be added minimized and mixed with the one present in other plugins (only when needed)
Additional libraries, added as files in the plugin, will be copied as they are. There is not obfuscation of any kind by default but it is possible to obfuscate it, if you want, previously to plugin deployment. Right now there is not a tool to facilitate the process.
Anyway, in my opinion, client side obfuscate source code is really easy to unobfuscate.
Regards.