You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: After the 1st number is entered in the First field, the Second field is populated with "submit". As seen in picture below. The code sample is below too. Note that changing "(Just n1)" to "Nothing" does not change the behavior.
Nick, for this purposes is the "pageFlow" modifier.
This bad effect is unavoidable in monadic flows when there are alternative
branches and the page is not fully rendered, since the generator of field
identifiers assign them sequentially and the values are filled from the
previous interactions. `pageFlow´ add a prefix that prevent the new fields
to be populated with values from other branches.
when the second getInt is rendered for the first time, it receives the
identifier "p1" but this "p1" was in the previously the identifier of
the submitButton field, that had "submit" as value, so the generator
wrongly assign this to the second sum field. But this is unavoidable unless submitButton is preceded with apageFlow` prefix, so that the identifier
generated for this field do not clash with the ones of the sum:
In this example, the submintButton field receive the identifier
"submitp0" the first time that it is rendered, so there is no clash with
the monadic expression above. the zero is because pageFlowalso restart
the field counter for the branch.
Description: After the 1st number is entered in the First field, the Second field is populated with "submit". As seen in picture below. The code sample is below too. Note that changing "(Just n1)" to "Nothing" does not change the behavior.
Line: n2 <- "Second " ++> getInt (Just n1) <++ br
Version
Code
The text was updated successfully, but these errors were encountered: