Implementing an finite state machine
I have to confess that informatics has to offer some really useful concepts. One of them is the finite state machine . Basically it works like this: The system is in a certain state. Then you have transition matrix that contains the condition for a transition from one state to another. If the update() function is called matrix conditions are checked. If a conditions is fulfilled for the current state a transition is done and the system enters the new state. Here is the current transition matrix: The states used are: Init: asks the user to drag in some files add_files: at least one file dragged in to_many_files: over fifty files dragged in. Tells the user that less would be better but doesn't force him to do so select_ungrouped: asks to select the "ungrouped cluster" choose_method: ask to put mouse over scan or lookup to get an detailed description of the two methods explain_lookup: As it says, explains the lookup process, advantages and disadvantages explain_scan: same he...