B
Beeeeeves
Hi
I am looking for any articles anyone may know of on developing a finite
state machine in a gui application?
Basically what I have is a fairly complex gui which needs to go through
several (3 - 7?) states. Complex algorithms are running as their own
separate code blocks operating on class-level data structures, the
completion of the processing of one set of data takes the application from
one 'state' to another. Once the last operation is complete, some user
activity will probably have occurred on the user interface that makes it
'dirty' and means the first operation has to start again, to cycle the
transition of repopulating the data structures to update them.
I've decided to go down the multithreading road, because the operations take
too long (a few whole seconds) for them to execute in the primary thread of
the user interface as they block it up, but there probably IS time for them
all to run in time to 'keep up' with the user entering data as they cannot
enter a lot of data incessantly fast all the time (or probably won't) - as
the time they have to lock some actual elements on the interface is
negligible compared to the total time they will take to run.
What's more, there are some cases which will be identified where the first
process can start again before the last one of the previous cycle has
completely finished, enabling a multithreading scenario to take advantage of
this.
What's the best way of accomplishing this? I'm trying to work on a suitable
class structure.
I am looking for any articles anyone may know of on developing a finite
state machine in a gui application?
Basically what I have is a fairly complex gui which needs to go through
several (3 - 7?) states. Complex algorithms are running as their own
separate code blocks operating on class-level data structures, the
completion of the processing of one set of data takes the application from
one 'state' to another. Once the last operation is complete, some user
activity will probably have occurred on the user interface that makes it
'dirty' and means the first operation has to start again, to cycle the
transition of repopulating the data structures to update them.
I've decided to go down the multithreading road, because the operations take
too long (a few whole seconds) for them to execute in the primary thread of
the user interface as they block it up, but there probably IS time for them
all to run in time to 'keep up' with the user entering data as they cannot
enter a lot of data incessantly fast all the time (or probably won't) - as
the time they have to lock some actual elements on the interface is
negligible compared to the total time they will take to run.
What's more, there are some cases which will be identified where the first
process can start again before the last one of the previous cycle has
completely finished, enabling a multithreading scenario to take advantage of
this.
What's the best way of accomplishing this? I'm trying to work on a suitable
class structure.