PostEvent deprecated


#1

In juce_VSTPluginFormat.cpp

can you change it to:

        void handleMouseDown (int x, int y) override
        {
            if (! alreadyInside)
            {
                alreadyInside = true;
                getTopLevelComponent()->toFront (true);
                owner.dispatch (effEditMouse, x, y, 0, 0);
                alreadyInside = false;
            }
            else
            {
                /*
                 *  PostEvent()   *** DEPRECATED ***
                 *  
                 *  Deprecated:
                 *    Use PostEventToQueue or CGEventPost instead.  
                */

                // PostEvent (::mouseDown, 0);
            
                CGEventRef theEvent = CGEventCreate( NULL );
                CGEventSetType( theEvent, kCGEventLeftMouseDown );
                CGEventPost( kCGSessionEventTap, theEvent );
                CFRelease( theEvent );
            }
        }

to get rid of the warning?

Thanks,

Rail


#2

I’ve no idea if that would work or not, TBH!

The deprecation warnings are annoying, but since supporting old Carbon VSTs will always involve linking to those old Carbon libraries, I don’t really think there’s much to be gained by trying to avoid the warnings. At some point we’ll have to flick the switch and turn off JUCE_SUPPORT_CARBON, and then all of this won’t matter any more.


#3

@Rail — thanks for providing an alternative. While I understand that Carbon support will go away eventually, “eventually” may be a very long time and until that happens I’d still rather be able to build completely warning-free so that ANY warning implies an issue to be addressed.