how to override Component::userTriedToCloseWindow() on closing AU window created via AudioProcessor:: createEditor()

i'm getting a juce_breakDebugger in Component::userTriedToCloseWindow()  when i click the close button of a juce generated audiounit plugin editor instantiated from    juce::AudioUnitPluginWindowCocoa 


the documentation says to override Component::userTriedToCloseWindow()  but how ? when i use createEditor() to instantiate a

AudioProcessorEditor, juce creates and hands me its own subclass of this. So i dont get to override the Component. 


what am i missing here ?    


im mean - ive already added my class as a AudioProcessorListener,  and changelistener ??  if so - where ?

bump -  any suggestion  Jules ? 

It's not the editor component that needs changing, it's your top-level window that needs to override that callback method. The library doesn't create that window for you, so you need to look at whatever code you're using to create the window, and add a callback to that class.