The problem is that I need to create preferences_page and other objects dynamically and so can't use the normal
CODE
static preferences_page_factory_t<CTestPrefPage> testPrefPage;
construct, because I don't know what pref pages the .NET components will have in advance. This also applies to mainmenu_commands_factory_t and others.
So is there any other way to create the objects than using a static factory ? I've tried
CODE
class PageWrapper {
public:
preferences_page_factory_t<CCustomPrefPage> testPrefPage;
};
and then
PageWrapper *p = new PageWrapper();
but that fails, because it needs to be done before all services are available (as I understood from the assert).
Thank you for any answers