PluginEditor ctor


#1

I’m noticing in the debugger that the plugineditor ctor is being called twice. Is this by design or am i doing something wrong?

Just curious. So far, things are working I’m just wondering why?

Thanks


#2

I think a temporary editor object might sometimes be constructed if the host needs to know what size it should be before creating the real one.


#3

More info…

I’m using the vstplugin code and the audio processor “createEditor” is being called twice thus the plugin editor ctor is called. Is this by design?


#4

Thanks for the answer. Glad I’m not doing something wrong.


#5

If the PluginEditor CROR is rather heavy, what would be a good way to postpone this heavy work till the real construction of the editor instance that will actually persist? A timer-based approach perhaps, or is there another more elegant way?


#6

Just don’t do any work until the editor is actually made visible?


#7

Maybe I’m wrong but isn’t the editor made visible in createEditor in the vst wrapper? I’m really trying to find a way to not have to build the whole GUI twice in VST hosts and can’t really figure out how to do it.