kas-gui / kas

Another GUI toolkit
Apache License 2.0
892 stars 27 forks source link

Support message sending #429

Closed dhardy closed 6 months ago

dhardy commented 6 months ago

Currently the second method is just a wrapper around the first, but (a) there might be a distinction between "push/emit a reusable message" and "send a non-reusable message" in the future and (b) ConfigCx might gain an embedded Id for the current widget, in which case push would lose the id parameter (but send would not).

handle_messages impls: do not expect cx.last_child().is_some()

Since it's now possible to send a message, handle_messages cannot assume that a message comes from a child.