Page 1 of 1

Change request global_data and sorting

Posted: Wednesday 08 July 2020 22:50
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

Re: Change request global_data and sorting

Posted: Wednesday 08 July 2020 23:50
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)

Re: Change request global_data and sorting

Posted: Thursday 09 July 2020 0:08
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.