Can we use only initialstate and null state?If yes,how will it behave?
Asked
Active
Viewed 98 times
1
-
In command's build graph you can use Cancel state and of course define your own states and state transition diagram. – vcp Apr 30 '19 at 04:53
1 Answers
1
As stated in the encyclopedia
The command is never in the initial state that automatically skips to the first state.
But when you read further (in the code example) :
CATDialogState *stStartState = GetInitialState("stStartPointId");
These are not the same states. In other words, GetInitialState returns you the first working state of your diagram (that will be reached automatically at command activation from the initial state) that can be associated with agents, be the source or target of any transition, as any other state that you further create with AddDialogState
You will have to reconsider your question then.
- can I have a command with the first state and null : yes. It could be a single user action command like selecting something, that leads to the null state, or associated with a dialog : the transition would loop on the first state as long as the user keeps selecting valid stuff, that would for example be displayed in a dialog's field, then the user would choose OK or Cancel, leading to null or cancel state
- can I have a command with the initial state and null : no. Since you wouldn't be able to create any transition, as you never have a way to manipulate that initial state.

Zzirconium
- 431
- 1
- 10
- 32