Subject: | wxPerl should not be required on Mac OS X 10.3 and later |
When running Wx applications on Mac with the standard perl interpreter (/usr/bin/perl for example) the following warning is displayed:
On Mac OS X please run scripts with the 'wxPerl' interpreter
And the application fails to show in the Dock, App Switcher or have an accessible menu. Running using wxPerl corrects the problem but is
awkward. Using the special 'wxPerl' interpreter is not necessary on Mac OS X version 10.3 and later provided the Wx perl interface executes
the following C code at some point before entering the MainLoop:
#include <ApplicationServices/ApplicationServices.h>
void make_front_application()
{
/* Become a foreground application */
ProcessSerialNumber kCurrentPSN = {0, kCurrentProcess};
TransformProcessType(&kCurrentPSN, kProcessTransformToForegroundApplication);
/* Become the frontmost application (only after TransformProcessType) */
SetFrontProcess(&kCurrentPSN);
}
The above requires linking against -framework ApplicationServices
NOTE: The TransformProcessType call is only available in Mac OS X 10.3 and later.