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
{{ message }}
Fields are identified only by dotted strings; no field handle to write, reset or subscribe through #46
What happens at 1fcdf12: every field is named by a dotted string: update_parameter("ui.footer", v), reset_parameter, get_resolved_value, the sets passed to on_state_changed/on_resolved_changed, dirty_fields. state.fields (FieldProxy, object_state.py:49-118) reads by attribute but returns Any, cannot write, and cannot be subscribed to. Subscription is per state, so each subscriber filters the changed-path set by comparing strings.
Nothing checks a path until it runs, and (see the issue on swallowed errors) a wrong one is then a silent no-op.
Wanted: a field handle object obtained from the declaration (for example state.field(UiSettings, "footer") validated once, or attribute access on a typed path builder) that carries read, write, reset, "is dirty" and "call me when this field changes", so consumers hold a handle and never spell a path.
Workaround in Toad now:toad.forms.FieldPath builds and validates the dotted path from the dataclass declarations once, and views subscribe through it.
Acceptance: a consumer can write, reset and subscribe to one field without a string literal for its path, and a handle for a field that does not exist fails where it is created.
Activity