[solved] Animate CallOutBox on launchASync?


#1

I'm trying to animate a fadeIn for a CallOutBox. This is what I have at the moment, and I realise its not the right way to do it.

​
    CallOutBox& editBox = CallOutBox::launchAsynchronously (noteEditor, editorBounds, this->getParentComponent());
    //this is not working..  need to call in subclass?
    Desktop::getInstance().getAnimator().fadeIn (&editBox, 120);

Do I need to create a subclass to do this? So it can call in its constructor:


Desktop::getInstance().getAnimator().fadeIn (this, 120);
​

There's at least another modification I'd like to do to CallOutBox, so a subclass would make sense. 

I hit a problem with that last week: http://www.juce.com/forum/topic/custom-calloutbox-crashing-child-component-badaccess
so if a subclass is the way forward I'll go back to trying to solve that issue too. 


#2

I managed to get this working, got a subclass of CallOutBox (see http://www.juce.com/forum/topic/solved-custom-calloutbox-crashing-child-component-badaccess) and called the animations there in the CallOutBoxCallback constructor.
All working nicely now :)