I have a UI, let's call it ParentUI, which includes ChildUI - another ComposableModel. In the default layout, ChildUI includes a toolbar.
When embedded in the ParentUI, I want the toolbars to be merged. It is easy to include the ChildUI tools in the ParentUI bar by adding ParentUI>>childTools, which I can then #add: to the layout. But the ChildUI tools also still show up in ChildUI (so they appear twice).
I ended up defining ChildUI>>#noToolbarSpec, which I can pass to the layout like "add: #(#currentScenario. #noToolbarSpec)", and which delegates to ChildUI class>>#noToolbarSpec. I want to have the default ChildUI spec simply extend noToolbarSpec, but I didn't look into that yet.
Anyway my question is: is this the best way to do what I'm trying to do?
Thanks!
Cheers,
Sean