I have the following problem: A Component is used to display a list of "addons" in a custom list box. When the user clicks an item in the list, I want to display some addon-specific options next to the list. The list holds references to these addons anyway so i thought, it might be a good idea to implement a member function for each addon like this:
- Code: Select all
std::shared_ptr<Component> Addon::getGuiPage();
So now, when the user clicks the list, i'd like to let the addon create it's gui component so I can add it to my window using "addAndMakeVisible". I call it like this:
- Code: Select all
addAndMakeVisible(someAddon->getGuiPage().get());
However, nothing happens. I guess, it's got to do with the whole shared_ptr stuff, but I have no idea, whats going on here. Please, can you help me?
Thanks a lot,
StrangeMan
