Skip to content

Keep posted form values for the event that posted them - #99

Merged
alexanderoster merged 1 commit into
alexanderoster:developfrom
krixkrix:fix/event-scoped-form-values
Nov 5, 2026
Merged

alexanderoster merged 1 commit into
alexanderoster:developfrom
krixkrix:fix/event-scoped-form-values

Conversation

@krixkrix

@krixkrix krixkrix commented Nov 5, 2026

Copy link
Copy Markdown

A posted form value is written to the session client variable .value, which every content poll of a sync:value edit overwrites with the bound parameter. A poll that lands between the payload write and the handler's GetUIProperty hands the handler the stored parameter instead of the value the user submitted, so the event silently runs with the old value.

handleEvent now also snapshots each posted form value into a per-event CUIEventFormValues, and CUIEnvironment's GetUIProperty* read "value" of a posted entity from that snapshot. The snapshot copies the parameter types from the client variables, so typed reads convert as before. Writing the value with SetUIProperty* during the event drops the snapshot, so a handler still reads back what it set.

No ACT change.

A posted form value is written to the session client variable
<entity>.value, which every content poll of a sync:value edit overwrites
with the bound parameter. A poll that lands between the payload write
and the handler's GetUIProperty hands the handler the stored parameter
instead of the value the user submitted, so the event silently runs
with the old value.

handleEvent now also snapshots each posted form value into a per-event
CUIEventFormValues, and CUIEnvironment's GetUIProperty* read "value" of
a posted entity from that snapshot. The snapshot copies the parameter
types from the client variables, so typed reads convert as before.
Writing the value with SetUIProperty* during the event drops the
snapshot, so a handler still reads back what it set. No ACT change.
@alexanderoster
alexanderoster merged commit 6663c4b into alexanderoster:develop Nov 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants