Current Position:Home > Using "Enum constant" in state machine.

Using "Enum constant" in state machine.

Update:11-30Source: network consolidation
Advertisement
hallo all.
i bild state machine, with 10 states. i move beetwen the states with Enum constant.
my qustion is: if i want to add/delete some  states, why i need to update the Enum constant at every state ?
there is  way to update "Enum constant" at one state, and  all other "Enum constant"(in other states) will update automatically
thanks

The Best Answer

Advertisement
If you save you enum as a type def and replace all of the current occurences of the enum wi the type def, you shoud there after only have to update teh typedef.
1) Find an oocurance of the enum
2) Right-click and change to control.
3) Find control and select Advanced customize
3) Pull down on selector and change from "control" to "type def"
4) Save control.
5) close editor and when prompeted say yes to replace control.
6) Change control back to constant
7) replcae all previous occurances by choosing replace >>> the typedef'd control.
8) Case structure will folow typed def from that point forward.
Ben
Message Edited by Ben on 12-24-2006 03:31 PM
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
  • Using "Enum constant" in state machine. Update:11-30

    hallo all. i bild state machine, with 10 states. i move beetwen the states with Enum constant. my qustion is: if i want to add/delete some  states, why i need to update the Enum constant at every state ? there is  way to update "Enum constant" a

  • How to avaoid java.lang.IllegalArgumentException: No enum const class Update:11-30

    HI , Iam getting java.lang.IllegalArgumentException when iam using switch case through Enum contants. //Enum Constants declaration public enum USEOFPROCEEDSVALUES { U1,U2,U3, U4} //Using Enum in Java class Test.java USEOFPROCEEDSVALUES useOfProceedsV

  • Any possible workaround to use annotations that require an enum constant... Update:11-30

    I am doing code generation and following the generation gap pattern (http://www.research.ibm.com/designpatterns/pubs/gg.html). For JPA i add a few annotation like @Table or @Inheritance to the generated-once client class and not the always-generated

  • What does enum constant do? Update:11-30

    Hi I have a program that I need to understand. There are enum constants at many places and I do not know what they do. When I find all instances it shows me many with other different named enum constants. Like enum "Read Queue" and "Initial

  • Overriding toString for enum constants Update:11-30

    can anybody please point me to some sort of example or documentation for overriding toString for (individual) enum constants. the javadoc indicates that this should be possibly but it is not entirely clear to me how to do so. thanks in advancei had a

  • LV 8.5.X: Enum Constant, Number of Elements Update:11-30

    Hello, I want to determine the number of elements of an enum constant, is that possible at all? Thanks and greetings, Udoparthabe wrote: What is the thing behind indexing 2? I mean, how will I have to know that when I index 2, I ll get the Enum const

  • Enum constant alias or duplicate ? Update:11-30

    Hi! I am trying to rename enum constants, but want to keep the old names for a while, because it is a big project with many modules and they can not be all changed at the same time. So I want to make a change, but keep the old values for compatibilit

  • IDL to JAVA - problem with enum, const assignment Update:11-30

    Hi, I have a problem with compile IDL to JAVA. I want to compile foo.idl to java by command: idlj foo.idl foo.idl:     enum color {       blue,       red,       green,       yelow     const color DEFAULT_COLOR = blue;But I get errors: foo.idl (line 8

  • Add an item to all state machine constants Update:11-30

    I have a state machine using an enum for the state indicator.  In the current state, the next state is indicated by an enum constant.  If I want to add a state, how can I update all of the constants?  Here is the problem.  If I add (or delete) an ite

  • Why are enums with constant-specifics  methods no enums? Update:10-11

    I'm working on an application which uses reflection to determine how a certain object should be represented in the GUI. If an object is an enum it will be represented as a drop-down box. Yesterday however our code broke on a newly added enum which us