Change request global_data and sorting

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
ronaldbro
Posts: 327
Joined: Thursday 15 November 2018 21:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Change request global_data and sorting

Post by ronaldbro »

Hi,

I have a small request for improving the in app editor.

In the dzVents editor in domoticz the scripts are sorted alphabetically except for 'global_data' which is always listed last. It makes perfectly sense to handle this file different in the sorting since this is a special file. I use the global data in almost every script. I have a long list of global variables, I added every device which is used in a script here so I can reference them by a variable and not the idx or name itself. Because of this an idx change for a device is easily managed, just change it in global data and all scripts are updated...
And when you open the editor the script which is listed first is always automatically, which doesn't make sense to me because this is just a script.

These two combined... It would be perfect if global_data is listed first so this file will be opened automatically and not a random other script. At least for me it will increase the user experience.

Of course this is not a big issue, but it are the little things that makes the difference ;)

Would be great if this is considered.

Regards Ronald
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Change request global_data and sorting

Post by waaren »

ronaldbro wrote: Wednesday 08 July 2020 22:50 In the dzVents editor in domoticz the scripts are sorted alphabetically except for 'global_data' which is always listed last.
it is not the dzVents editor but an event Editor. It is also used for classic Lua, Blockly and Python and that is one of the reasons why a sort order specially for dzVents will not fly.

global_data is not always last on my system. It is just part of the sorted list just as all other scripts. The sorting order is digits, upper case, lower case. If your global_data is last in the list you probably do not use lower case as start char for your scriptnames.

If you want global_data to be the first script in the list, the other scripts should start with an ascii value something higher as g.
One way of doing that is to prepend all other scriptnames with · (alt + 250 on the numeric keypad)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
ronaldbro
Posts: 327
Joined: Thursday 15 November 2018 21:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Netherlands
Contact:

Re: Change request global_data and sorting

Post by ronaldbro »

Thanks for the explanation Waaren, I would have never expected a case sensitive sort and indeed all my scripts start with a capital.

Don't really like to prefix all my scripts, but I would like global_data to be listed first an opened automatically. Have to think about what would work best for me.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest