Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Hi All,

I have developed a perl GUI application using Wx::Perl. The front end was developed using wxGlade and the application is working as expected when I run it from Padre or cmd. Now I want to build an exe of my application. So I used PAR::Packer (pp) to build the exe. After many attempts I was able to built an exe (I got many missing dll and Wx module error and I added them all manually).

Now I have got two issues:

1. The generated exe is not showing the GUI. It just exists after hanging for few seconds. No errors, nothing. After a long debugging/rebuilding I was able to find the cause. My main program is as bellow (It was generated by xwGlade)

package main; unless(caller){ local *Wx::App::OnInit = sub{1}; my $app = Wx::App->new(); Wx::InitAllImageHandlers(); my $provisioning = provisioningChecklist->new(); $app->SetTopWindow($provisioning); $provisioning->Show(1); $app->MainLoop(); }

I found out that the exe is not entering the 'unless' block. If I comment out the 'unless' condition and rebuild the exe, GUI works.

So what is this 'caller' and why is it not running when I pack it using PAR::Packer, but works fine if it is run as normal perl script?

2. My Application uses a Marquee style progress bar while it populates the data in background. It is implemented using two threads. The logic is as below:

THREAD 1 enters a loop, generates an EVENT and sleeps for few milliseconds. The loop is controlled by a shared variable. The main program catches the EVENT and fires Wx::Gauge->Pulse;

THREAD 2 does the actual work and result is set in shared variable. An EVENT is fired and the main program catches it and populates the grid with the result. After all the work is done, shared variable is set to stop the THREAD 1 loop and an EVENT is generated to destroyed the progress bar.

This works fine when I run the script from cmd or Parde. But when I run the exe, progress bar window appears but the gauge is not moving. However the grid is populated with data. I am confused with the behaviour and dont know how to debug the exe. Any help on how to proceed further is greatly appreciated.

English is not my native language, hence forgive me for any mistakes and for the long post.

"Experience is the child of thought, and thought is the child of action."

In reply to wxperl + PAR::Packer + GUI not working by alfoos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others examining the Monastery: (10)
    As of 2021-01-28 12:39 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?