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
For many states, it is logically necesssary to know a property value from the exact moment when a changed-signal was emitted; not from the rather arbitrary point in time when the state is actually activated. For example, a state might handle the addition of an interlocutor by reacting to interloc:all:pushed. However, multiple interlocutors might enter Roboy's vision simultaneously, at which point it becomes intractable not know which of the interlocutors is new and which is not.
For this purpose, signal payloads (or "values") are introduced through the following APIs:
A payload (e.g. an interlocutor id) may be submitted through the state return value state.emit(payload)
A payload may be retrieved through special context wrapper entries for each trigger signal: An entry always exists, even for triggers which did not contribute to the activation. An error is only raised for signals that are not mentioned as triggers at all.
The payload for the :changed signal is always the new property value. The value for the :pushed and :popped signal is always the full property path of the created/deleted property.
The text was updated successfully, but these errors were encountered:
For many states, it is logically necesssary to know a property value from the exact moment when a changed-signal was emitted; not from the rather arbitrary point in time when the state is actually activated. For example, a state might handle the addition of an interlocutor by reacting to
interloc:all:pushed
. However, multiple interlocutors might enter Roboy's vision simultaneously, at which point it becomes intractable not know which of the interlocutors is new and which is not.For this purpose, signal payloads (or "values") are introduced through the following APIs:
state.emit(payload)
:changed
signal is always the new property value. The value for the:pushed
and:popped
signal is always the full property path of the created/deleted property.The text was updated successfully, but these errors were encountered: