...
Now going through the negotiation process,
- let p[i] be the value of the i-th parameter of the PPM, and let PL be the parameter list {p[0], .. ,p[n-1]}
- let v[i] be the visibility flag of the i-th parameter (whether is rendered at all in the UI)
- let u[i] be the usability flag of the i-th parameter (whether can edit vs. being rendered read-only)
- let invalid[i] be the invalid message of the i-th parameter (only rendered when set)- let honor_constraints(PL) be a method that acts on the PPM and can modify its parameters PL- - any parameter that is constraint eg. by choices(PL) must be checked each time the PL changes- - if a parameter's value does fail the constraint check, it needs to be reset to its default value- - this in principle allows for developers to setup a situation, where parameters are validated and reset such that this process runs into an infinte loop, in other words the PL in theory migth not have a fixed point under given constraints, the framework needs to detect such cases at runtime and stop iterating the loopdef honor_constraints(PL):
forEach i in
1) Fill in defaults in two passes:
Code Block |
---|
for i in 0..n-1 |
...
p[i] |
...
:= default_i( |
...
1) Fill in defaults:
Code Block | ||
---|---|---|
| ||
//TODO we need to find a fixed point forEach i in 0..n-1 ) // no arg, init PL // fixed point search for PL, run this outer loop until PL does not change any more for each permutation perm of {0..n-1} for i in perm // <== perm dictates the order in which the indices are processed p[i]:= default_i(PL) honor_constraints(PL) if none of the p[i] had changed, then // we found a fixed point goto(2) render invocation veto message "Cannot find an initial fixed point for action parameter defaults." |
2) Process visibility and usability 2) Prozess visibility and usablility (disable/hide)
Code Block |
---|
forEachfor i in 0..n-1 v[i]:= not hide_i(PL) u[i]:= not disable_i(PL) |
3) Prozess Process individual parameter validity
Code Block |
---|
// skip this step until (5) has been reached at least once! if step_5 was reached, then forEachfor i in 0..n-1 invalid[i]:= validate_i(PL) |
4) Wait for user interaction,
- let reset_i be a user initiated reset request for the i-th parameter
- let update_i be a user initiated update for the i-th parameter, either triggered by direct entering of a value or using autoComplete or choices
Code Block |
---|
on reset_i:
p[i]:= default_i(PL)
on update_i:
p[i]:= the proposed new value as given by the update event
on user initiates the action invocation
goto (5) // process parameter-list validity
goto (2) // start over
|
5) Process parameter-list validity
...