Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: wxPerl and MacOS

by Anonymous Monk
on Sep 23, 2020 at 10:20 UTC ( [id://11122116]=note: print w/replies, xml ) Need Help??


in reply to wxPerl and MacOS

The wxWidgets docs suggest that I should override Wx::App::MacOpenFiles but this function does not seem to be in wxPerl.

why do you say that? Add this to your program

sub Wx::App::MacOpenFiles { die "@_" }

Replies are listed 'Best First'.
Re^2: wxPerl and MacOS
by sciurius (Sexton) on Sep 24, 2020 at 20:39 UTC

    Sure, I can *write* the function, but it will not get called by the Wx framework...

      If the wxPerl XS bindings do not have that callback, then you will need to write a patch adding that binding. It should not be too hard — XS can also supply an empty default Wx::App::MacOpenFiles sub for the user to override, or accept a coderef to call when WxWidgets invokes the callback.

      So you tried it? Go ahead and try it.
Re^2: wxPerl and MacOS
by perlfan (Vicar) on Sep 23, 2020 at 15:14 UTC
    Yes, welcome to the world of monkey patching. Or as I now like to call it, monkey punching.

    For OP, what Anonymous Monk is suggesting is that you define the fully qualified method in your own code. Will this work? I have no idea. But it is a pointer in the right direction for where to stick the method you're claiming you can easily write.

      Will this work? I have no idea.

      amazingly helpful

        Glad you think so. I wasn't sure, cuz idk and stuff. Appreciate it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11122116]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found