Futilities/v0.6/clade/Kiosk/WUIDL/@fx/RunInput
< Futilities | v0.6 | clade | Kiosk | WUIDL
Jump to navigation
Jump to search
History
- 2026-02-13 It doesn't make sense to me that we check the action status (
$oAct->ItWentLike()) before trying to run it. I suppose there was a problem, at some point, with stuff getting run more than once -- but this way of preventing that is a kluge which could lead to worse problems.- Also, since it's not checked again after running (
$oAct->Go()), presumably it's checked somewhere else and doesn't need to be looked at here at all.
- Also, since it's not checked again after running (
Code: 2026-02-13 v2
#
public function RunInput() {
$oaActs = $this->Actions();
$arActs = $oaActs->GetVals();
foreach ($arActs as $oAct) {
$oAct->Go();
}
}
Code: 2026-02-13 v1
#
public function RunInput() {
$oaActs = $this->Actions();
$arActs = $oaActs->GetVals();
foreach ($arActs as $oAct) {
$oHow = $oAct->ItWentLike();
if ($oHow->AnyMessages()) {
echo $oHow->RenderMessages();
}
if ($oHow->WasTried()) {
if ($oHow->GetOkay()) {
echo 'Action already completed...?'.CRLF; // TODO: name the action(s)
} else {
echo 'Stopping because of an input error.'.CRLF; // TODO: name the action
}
} else {
$oAct->Go();
}
}
}