Send a message during construction?


#1

I just hit a problem trying to do a SendActionMessage() from the constructor of one of my components. The message was destined for a component that apparently wasn’t fully constructed yet, and hilarity ensued.

Is there a way to know when a class could send messages, or do other things that require the rest of the components to be fully constructed? I guess I’m looking for a Component routine that could be overridden, which would be called at the appropriate time. Does something like that exist in juce?


#2

No, I don’t think there really could be anything like that. There’s no way to know if a class is fully constructed or not - that’s just the way c++ is.


#3