develooper Front page | perl.wxperl.users | Postings from July 2010

[rt.cpan.org #59092] wxPerl should not be required on Mac OS X 10.3 and later

Thread Next
From:
via RT
Date:
July 4, 2010 14:58
Subject:
[rt.cpan.org #59092] wxPerl should not be required on Mac OS X 10.3 and later
Message ID:
rt-3.8.HEAD-13916-1278267711-491.59092-15-0@rt.cpan.org
Sun Jul 04 14:21:51 2010: Request 59092 was acted upon.
Transaction: Ticket created by mjk
       Queue: Wx
     Subject: wxPerl should not be required on Mac OS X 10.3 and later
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: mackyle@gmail.com
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=59092 >


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.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About