I’m trying to make a subcomponent, to keep things tidy.
Taking inspiration from IVNumberBoxControl, I overrode IControl::OnAttached
void OnAttached() override
{
IRECT b = mWidgetBounds;
GetUI()->AttachControl(mScopeControl = new IVScopeControl<2,128>(b.GetGridCell(0, 0, 1, 2), "Scope_101"), scopeCtrlTag);
}
The main difference you can see here is that I’m attaching with a control Tag.
After resizing, this triggers the assertion at line 303 of IGraphics.cpp
assert(result.second && "AttachControl failed: ctrl tags must be unique");
How can I solve this?
If my approach is wrong, what should I do to create a wrapper component, like JUCE’s Component?