Repository navigation
OnChange is oneData::OnChange; ItemRef forwards get(); needs OneData >= 0.1.22 - #2
Merged
Merged
Conversation
Needs OneData >= 0.1.20. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A component over an ItemRef (OnSync) reads the referred node's value. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
OnChange lives in OneData (0.1.20), a component over an ItemRef needs no Type (0.1.21), and a ReadOnly composes into an item (0.1.22). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows OneData #3 (merged, 0.1.22).
What changes
OnChange<fn>isoneData::OnChange<fn>now:using oneData::OnChange;replaces the struct inmenu/item.h(same behaviour, same call sites;oneMenu::OnChangestill names it). It is a data component, not a menu one. Without this, code with bothusing namespace oneMenu;andusing namespace oneData;and an unqualifiedOnChange<fn>is ambiguous now that OneData has its own.ItemRef::get()forwards the referred node'sget(), so a component over anItemRef(OneData'sOnSync<fn>) reads the referred value. Only instantiated when called.OneData >= 0.1.22(OnChangelives there;OnSynccomposes over anItemRef;ReadOnlycomposes into an item).Tests, against OneData main
test/negative/run.sh(5/5, g++ and clang++), the four native tests (test_footer,test_idtext,test_kbd_frames,test_view), and a check with both namespaces open that an unqualifiedOnChange<fn>resolves to the same entity asoneData::OnChange.Cost
None by construction: a struct moved to a header OneMenu already includes, and one member function of a class template that is instantiated only when called. I did not measure an example's size before and after.
🤖 Generated with Claude Code