mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-27 11:29:24 +00:00
a start on some design work for sane state machines that actually cover
* docs/state-machines.txt: a start on some design work for sane state machines that actually cover all the cases.
This commit is contained in:
parent
0c000c070a
commit
650b212db1
|
@ -1,3 +1,8 @@
|
|||
2000-08-10 Maciej Stachowiak <mjs@eazel.com>
|
||||
|
||||
* docs/state-machines.txt: a start on some design work for sane
|
||||
state machines that actually cover all the cases.
|
||||
|
||||
2000-08-10 Andy Hertzfeld <andy@eazel.com>
|
||||
|
||||
* icons/backgrounds.png:
|
||||
|
|
72
docs/state-machines.txt
Normal file
72
docs/state-machines.txt
Normal file
|
@ -0,0 +1,72 @@
|
|||
|
||||
Proposal for the loading state machines
|
||||
|
||||
|
||||
ViewFrame state machine
|
||||
|
||||
States are:
|
||||
|
||||
E: Empty (the initial state right after construction)
|
||||
N: No load_location request (a view component has been loaded, but no load_location request has been sent yet)
|
||||
W: Waiting (waiting for a response after a load request)
|
||||
U: Underway (the component has responded and the load is assumed underway)
|
||||
L: Loaded (the component has finished loading successfully)
|
||||
F: Failed (there was a fatal error somewhere)
|
||||
|
||||
X: this stimulus is guaranteed impossible in this state
|
||||
|
||||
|
||||
Things I was unsure about:
|
||||
|
||||
?1: It's theoretically possible to call load_client on a ViewFrame
|
||||
more than once, thus loading a new component into an existing
|
||||
ViewFrame, although Nautilus never does this. Is it better to forbid
|
||||
this, or clearly define the effects?
|
||||
|
||||
?2: Once a load has failed at some stage, should it be OK for Nautilus
|
||||
to try to make further calls of any kind?
|
||||
|
||||
?3: A component making calls on the ViewFrame interface before it has
|
||||
ever been told even an initial location to load is weird but, I
|
||||
suppose, not excluded by contract - what should be done here? Should
|
||||
such calls be taken as errors, or handled in some way?
|
||||
|
||||
|
||||
State Transision Chart
|
||||
|
||||
|
||||
Initial State
|
||||
|
||||
|
||||
| E | N | W | U | L | F |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
successful load_client call | N | ?1 | ?1 | ?1 | ?1 | ?2 |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
unsuccessful load_client call | F | ?1 | ?1 | ?1 | ?1 | ?2 |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
nautilus_view_frame_load_location call | F | W | W | W | W | ?2 |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
open_location call from component | X | ?3 | U | U | L | X |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
open_location_in_new_window | X | ?3 | U | U | L | X |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
report_location_change | X | ?3 | U | U | U | X |
|
||||
S ----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
t report_selection_change | X | ?3 | U | U | L | X |
|
||||
i ----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
m report_status | X | ?3 | U | U | L | X |
|
||||
u ----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
l report_load_underway | X | ?3 | U | U | U | X |
|
||||
u ----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
s report_load_progress | X | ?3 | U | U | U | X |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
report_load_complete | X | ?3 | L | L | L | X |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
report_load_failed | X | ?3 | F | F | F | X |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
set_title | X | ?3 | U | U | L | X |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
user hits cancel on timer dialog | X | X | F | X | X | X |
|
||||
----------------------------------------|-----|-----|-----|-----|-----|-----|
|
||||
|
||||
|
Loading…
Reference in a new issue