aui icon indicating copy to clipboard operation
aui copied to clipboard

`setContents(Label {"Test"})`: better diagnostics needed

Open Alex2772 opened this issue 3 months ago • 0 comments

One More Step Before opening this issue

What happened?

At this moment, an attempt to push a view (not a container) to AWindow::setContents will produce the following error:

Image

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

Alex2772 avatar Sep 13 '25 18:09 Alex2772