Ninext project
good evening to all,
I create this post to organize the Ninext project. For those who are new to it, it is composed of several JavaScript modules that allow you to add badges on tabs and buttons, catch selection events on views, execute JavaScript from Ninox script, inspect dependencies between database fields.
This post is here to talk about the project and the procedure for those who would like to implement it in your databases. I would like to take this opportunity to remind you that this is a test project that evolves regularly and I invite you to be cautious and not to use it on commercial databases for the moment.
The sources of the project are available and downloadable on Github.
Thanks to all of you for all your messages of support and for your help to debug and make the project progress a little more every day .
I made the project initiation procedure evolve thanks to the precious help of M. Daaboul who told me that we could use the Ninox dialog box with HTML code. It is no longer necessary to create a window and an HTML field for this. You just have to copy the code below in the Trigger after open in the Options.
var code := http("GET", "https://raw.githubusercontent.com/JacquesTur/Ninext/main/loadModules.html").result;
dialog("Ninext intialization", "<script>
window.exConfigLoadModules = {
completion: false,
badges: true,
evalJS: true,
viewEvent: true,
buttonEvent : true,
fieldsInspector: true,
nativeJS: true,
autoCloseDialog: true
};
</script>" + code, ["close"])
The dialog box will be displayed stealthily then disappear. If you want it to stay displayed with its "close" button, set the autoCloseDialog parameter to false.
231 replies
-
exBages bug fix : I found a bug yesterday that could affect tabs that used the onUpdate event. It could lead to a display failure of the edit bar of the fields or to permission errors. The bug is fixed this morning with version 1.0.7 of exBages.
-
Have implemented as per your email and that seems to have rectified the matter. Thanks once more for all you hrd work for the Ninox community!!
-
Following Alan Cooke good idea, I added a filter box on the table view. See the result here.
Now the line "tableView:true" (line 11) must be added to window.exConfigLoadModules to access it.var code := http("GET", "https://raw.githubusercontent.com/JacquesTur/Ninext/main/loadModules.html").result; dialog("Ninext intialization", "<script> window.exConfigLoadModules = { completion: false, badges: true, evalJS: true, viewEvent: true, buttonEvent : true, fieldsInspector: true, nativeJS: true, tableView: true, autoCloseDialog: false }; </script>" + code, ["close"])
-
Ninox has just released version 3.7.11 on the cloud.
Unfortunately, this version causes a bug when using the http function with only 2 or 3 parameters. Only the function with 4 parameters works correctly.
The result is that the hourglass loops endlessly:
To avoid this, use the http function with 4 parameters by putting an empty JSON in the last two parameters ( {}, {} ) like this:
var code := http("GET", "https://raw.githubusercontent.com/JacquesTur/Ninext/main/loadModules.html", {}, {} ).result;I have reported the problem to Ninox and I hope they will fix it soon.
-
Once again - a big thanks to Mr TUR :-)
-
I have added a few tools recently. I've listed them here to centralize access and prevent them from getting lost in the abundant history of this forum.
Allow to generate QRCode and put-it on image or file.
Implementation of the muti-language user interface.
popup window to track debugging information.
Now, to uses language and debug tracer, add this item on exConfigLoadModules :
languages:true, debugTracer:true,
This is the complete initialization code to put in the AfterOpenTrigger options:
var code := text(http("GET", "https://raw.githubusercontent.com/JacquesTur/Ninext/main/loadModules.html", {}, {}).result); dialog("Ninext intialization", "<script> window.exConfigLoadModules = { completion: false, badges: true, evalJS: true, viewEvent: true, buttonEvent : true, fieldsInspector: true, nativeJS: true, tableView: true, languages:true, debugTracer:true, autoCloseDialog: false }; </script>" + code, ["close"])
note : completion and evalJS are now useless. completion has been replaced by the new script editor. evalJS is replaced by NatvieJS which is directly integrated in the Ninox script.
-
One last thing, most of these add-ons would not have been created without your ideas and proposals. Thanks to all of you for your creativity and for sharing all these good ideas.
And even if I don't answer every time because I don't want to put too many messages on the forum, I want you to know that I read and appreciate all your messages of support. -
Following an excellent comment from Sean, I compiled the Ninext project into a single downloadable JavaScript file. I took the opportunity to do some sorting:
I removed The autoCompletion module which is no longer useful since the new code editor, and the EvalJS module which is now advantageously replaced by nativeJS.
The loading code of Ninext is now the following:function getNinext() do var res := http("GET", "https://raw.githubusercontent.com/JacquesTur/Ninext/main/dist/ninext.js", {}, {}); var version := extractx(text(res.result), "(?:var exModulesVersion = ')(.*)(')", "", "$1"); res.result end; dialog("Ninext intialization", "<div style='white-space: normal;' ; id='exLoadModule'></div> <script> window.exConfigLoadModules = { badges: true, viewEvent: true, buttonEvent : true, fieldsInspector: true, nativeJS: true, tableView: true, debugTracer : true, languages : true, autoCloseDialog: false };" + getNinext() + "</script>", ["close"])
This code has the advantage of reading 10 times faster than the previous one which loaded the files one by one. Moreover, you can save the content of the ninext.js file in one table to access it even offline.
Here is an example that uses the #ninextVersions table to automatically save new versions and, if GitHub access is not available, it reads the latest version from the array to use it.
function getNinext() do "// load the last locale version"; var rec := last(select '#NinextVersions'); "// load the last GitHub version"; var res := http("GET", "https://raw.githubusercontent.com/JacquesTur/Ninext/main/dist/ninext.js", {}, {}); "// extract code and version number from GitHub result"; var vCode := text(res.result); var vVersion := extractx(vCode, "(?:var exModulesVersion = ')(.*)(')", "", "$1"); "// in case of GitHub is not avaible, return local version"; if res.error then vCode := rec.version else "// else, if GitHub version is newer, save GitHub result in local table"; if vVersion != rec.version then var newRec := (create '#NinextVersions'); newRec.(version := vVersion); newRec.(code := vCode) end end; "// return the more resently disponible code"; vCode end; dialog("Ninext intialization", "<div style='white-space: normal;' ; id='exLoadModule'></div> <script> window.exConfigLoadModules = { badges: true, viewEvent: true, buttonEvent : true, fieldsInspector: true, nativeJS: true, tableView: true, debugTracer : true, languages : true, autoCloseDialog: false };" + getNinext() + "</script>", ["close"])
This mechanism also allows you to keep the old version of Ninext and to go back when, unfortunately, an update brings more bugs than improvements. And for those who are on the Mac application (now free), it allows you to keep a couple App Ninox / Ninext that works well in case the malfunction of nient comes from an evolution of Ninox.
The old code that loaded loadModules.html continues to work for now. It will not be maintained or updated afterwards. So I invite you to switch to the new loading code as soon as you can. Of course if you have any difficulties, I will be there to help you. You can already test the NativeJS to Forum V2 application in attachment which contains the new loading code.note: ninext.js, which contains the complete source code of the Ninext project, has deliberately not been minified so that you can still see what the code does. This is important for the security of your data. Moreover, it allows those who wish to debug it with the development tools of browsers.
I wish you all a great start to the year 2023! -
Jacques TUR At first, thank you very much for this amazing tool. It's really great. I have one issue related to your tool I realized today.
This error warning icons on tables are normally an on board feature of Ninox itself, but this warning only appears, when you tool is loaded. If you tool isn't loaded and I activate admin mode, it doesn't appear.
The problem is, that I checked all elements in the table and found no error in the scripts.
Do you have any idea, why this error icon is there?
Thank you very much.
Best, Ralf
Content aside
-
17
Likes
- 3 days agoLast active
- 231Replies
- 5406Views
-
38
Following