LabVIEWForum.de - Enums in functional global variables

LabVIEWForum.de

Normale Version: Enums in functional global variables
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hallo,
ich benutze in meinem Programm functional global - Variablen.
Nun stehe ich vor dem Problem, daß ich deren Funktionalität erweitern will. Wenn ich einen Eintrag im Enum-Feld ändere, werden sofort alle Verbindungen der functional global gekappt. Nun habe ich natürlich keine Lust, alle Kopien der functional global zu aktualisieren und die Drähte neu zu ziehen.
Ich habe dazu auch schon folgenden Text gefunden, verstehe ihn aber inhaltlich nicht.


Problem: Enums are widely used as case selectors in State Machines. If the user attempts to add or delete a state from this enum, the remaining connected wires to the copies of this enum will break. This is one of the most common obstacles when implementing State Machines with enums.

Solution: Two possible solutions to this problem are:
1. If all the enums are copied from the changed enum, the breaks will disappear.
2. Create a new control with the enum, and select “typedef” from the submenu. By selecting typedef, all of the enum copies will be automatically updated if user adds or removes a state.


Kann mir bitte jemand erklären, was die in Lösung 2 meinen?
Ich soll ein neues Control mit dem Enum erstellen?
Ich habe auch nirgendwo "typedef" im Menü gefunden!

Vielen Dank!
Typedef ist sehr interessant. Dazu:

Rechtsklick auf Enum-Control->Advanced->Customize. Dann kannst du oben Typedef auswählen und abspeichern. Wenn du danach in diesen getypedeften Control Änderungen machst(z.B. neue Einträge), dann werden alle Controls, Konstanten oder Indicators, die aus diesem einen Typedef erstellt wurden, automatisch updatet.

eg
Referenz-URLs