Order of appearance device states on control pages and GUI

Posted on
Tue Jan 26, 2021 8:55 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Order of appearance device states on control pages and GUI

Are custom states on the GUI and Control pages listed alphabetically by state id or ControlPageLabel? or Both?

Example states:
    <state id= "roomName"> <ControlPageLabel>Room Name</ControlPageLabel></State>
    <state id= "mainLight"> <ControlPageLabel>Main Light</ControlPageLabel></State>

Will appear (GUI / Control Page: )
    mainLight / Main Light
    roomName / Room Name

From what I've seen, regardless of how it's ordered in the Devices.xml list, the states are ordered alphabetically... is it by the state id or by ControlPageLabel or both?
If I change the device.xml to:
    <state id= "001roomName"> <ControlPageLabel>Room Name</ControlPageLabel></State>
    <state id= "002mainLight"> <ControlPageLabel>Main Light</ControlPageLabel></State>

Will it appear (GUI / Control Page):
001roomName / Room Name
002mainLight / Main Light

or would they both need to be formatted?:
    <state id= "001roomName"> <ControlPageLabel>001_Room Name</ControlPageLabel></State>
    <state id= "002mainLight"> <ControlPageLabel>002_Main Light</ControlPageLabel></State>

Bill
My Plugin: My People

Posted on
Tue Jan 26, 2021 9:43 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Order of appearance device states on control pages and G

If I recall correctly, they will appear in the order that they're listed in the XML--I don't think Indigo sorts them at all. This is a sample menu from one of my plugins.

Screen Shot 2021-01-26 at 9.41.52 AM.png
Screen Shot 2021-01-26 at 9.41.52 AM.png (101.55 KiB) Viewed 1268 times


Note to self: those should probably be reordered...

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Jan 26, 2021 10:51 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Order of appearance device states on control pages and G

DaveL17 wrote:
If I recall correctly, they will appear in the order that they're listed in the XML


Correct.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jan 26, 2021 12:12 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Order of appearance device states on control pages and G

So is it just on the main page of the indigo GUI where custom device states are listed alphabetically? That's good. I was afraid I was going to have to name states numerically to get them in order.... I guess I only need to do that if I want them in order on the Indigo main page GUI

Thank you Dave & Jay

Bill
My Plugin: My People

Posted on
Wed Jan 27, 2021 10:26 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Order of appearance device states on control pages and G

whmoorejr wrote:
So is it just on the main page of the indigo GUI where custom device states are listed alphabetically? That's good. I was afraid I was going to have to name states numerically to get them in order.... I guess I only need to do that if I want them in order on the Indigo main page GUI


Yeah, I don't think we explicitly do it, but rather that's an automatic feature of the Cocoa list view we use to display states. There is probably a configuration switch that automatically keeps the list sorted that we didn't turn off or something.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests