Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand AdaptConfigCx, AdaptEventCx #423

Merged
merged 8 commits into from
Dec 8, 2023
Merged

Expand AdaptConfigCx, AdaptEventCx #423

merged 8 commits into from
Dec 8, 2023

Conversation

dhardy
Copy link
Collaborator

@dhardy dhardy commented Dec 8, 2023

AdaptEventCx now includes input data. Motivation: reduce the parameter count to various closures. Caveats:

  • AdaptEventCx must be templated over the input data type. Since users often don't need to explicitly type closure parameters this seems acceptable (at least, more so than it would be for EventCx).
  • This data is orthogonal to the needs of EventCx, hence (in large part) why EventCx does not embed input data.
  • AdaptConfigCx cannot do the same since it is used by on_configure which does not have access to input data.

Edit: the above provide sufficient motivation not to do this. Instead, data is passed separately with a few exceptions (namely Adapt::on_message which is frequently used, (so far) never wants input data, and can be replaced by the lower-level Adapt::on_messages method where data is needed).

These types are now used by AdaptWidget, Grid and List.

Add fns map_message and on_message to Grid and List.

Rename OnUpdateAdaptEvents.

@dhardy dhardy merged commit a979f04 into master Dec 8, 2023
5 checks 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.

1 participant