From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
ASTDan

Nested States for Enums

Status: New

Hello,

 

I am a user of Gmail and they came out with a great feature I think could be applied to State machines

 

Nested Labels

 

They use nested labels.  If you type in the following you can have a "Folder" Test/Init.

 

Using this concept I think you could easily add "folders" to your state machines.  You could group like states easily.  The case structure would recognize the "/" character and group and indent appropriately.

 

Enum Dialog.png

 

Example_VI_BD.png

Dan Shangraw, P.E.


   

8 Comments
altenbach
Knight of NI

If I understand you right, this has really nothing to do with case structures. What you want is a new type of enum with a built-in hierarchy.

 

(For case structures, we already have this possibly related idea.)

 

 

ASTDan
Active Participant

Yes the enum would have the hierarchy.  The hierarchy would also be be reflected in the case structure.  When you are trying to find a state it would be organized using a hierarchy.  The picture of the case statement shows how the individual case would look.  When you selected the drop down arrow on the case structure you would see the hierarchical list (no picture sorry).

 

 

 

Dan Shangraw, P.E.


   

crelf
Trusted Enthusiast

We do that a lot, but use dot notation.  For example: main.Init, main.Close, test.Run, test.Close.  I'd warn against using "/" as that denotes a choice between the leader and follower in the English language.  Using "\" would be okay though.





Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
ASTDan
Active Participant

I use a dot too!  I saw that Gmail was using "/" and thought they were on to something.  The character in my opinion doesn't matter.  I think it would be cool if the enum and case structure would indent based on that character.  Maybe the user could choose the character.

 

Also there probably needs to be a feature to turn the hierachy functionality on and off with the default being off. 

Dan Shangraw, P.E.


   

jcarmody
Trusted Enthusiast

The CaseSelect plugin for the JKI Right-Click Framework looks similar to your picture.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

crelf
Trusted Enthusiast
     by Active Participant jcarmody on 12-02-2010 05:30 PM




Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
ASTDan
Active Participant

I have seen the JKI state machine and I like the way they group their states.  I prefer using type def enums over strings.  I am proposing having a more native way to acomplish what the JKI state machine has.

Dan Shangraw, P.E.


   

Jason_Harrigan
Member

There should be some way to group and organize states.