aui
aui copied to clipboard
`setContents(Label {"Test"})`: better diagnostics needed
One More Step Before opening this issue
- [x] To follow our Code of Conduct
- [x] I've considered existing issues on GitHub page and didn't find a similar issue
What happened?
At this moment, an attempt to push a view (not a container) to AWindow::setContents will produce the following error:
Which is misleading and hard to understand for a newcomer.
Either static_assert or requires clause is needed. I want the error indicating you have passed an AView instead of AViewContainer; wrap AView with some kind of container, i.e., view -> Centered { view }.
Relevant log output or stack trace
Steps to reproduce
AUI_ENTRY {
auto w = _new<AWindow>("test");
w->setContents(Label { "test" });
return 0;
}
Affected Platforms
No response
Link to build, i.e. failing GitHub Action job (if any).
No response