Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

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

Every post is a learning experience. "AM" thank you very much for your time and comments. I am always amazed at the time and effort donated by the Monks in answering questions.

Noted: I should have posted to SoPW rather that CUFP. I flipped a coin and picked the wrong place. I also should have linked to the original post and author. I got lazy and didn't look up how to do that.

The original script did not display the sample graphics in the frame. Thus my changes to the sample graphic code to get it to draw. "Bug" was the wrong word to use as was pointed out. The libraries certainly changed since 2003.

I saw the posts relating to the Win32 modules, but my goal is exploring wxPerl, so I didn't persue that option.

I saw a mention last night in the wxWidgets documentation to using Refresh before Update to force a screen repaint. Trying that in my original code worked differently, but not as I hoped. More reading is required.

My original post was cut and pasted from my wxperl_users email and must have gotten scrambled in the translation. Maybe that was the source of your compile problems. I have learned to post from the original file in the future, sorry.

Too bad wxWidgets can't select a specific window, but the explanation made sense.

I'm not informed enough to argue the wxPerl async issue, but I thought that was the purpose and function of event driven programming. It is in the real-time world I come from.

When I run your suggested code, the sample graphic is still not being drawn and I get the following warning:

(PM-ScreenCapture.pm:1799): Gtk-WARNING **: Tried to set the file choo +ser to multiple selection mode, but this is not allowed in SAVE or CR +EATE_FOLDER modes. Ignoring the change and leaving the file chooser +in single selection mode. saved /home/pete/Projects/perlprojects/CitrusPerl.proj/screenshot.png saved /home/pete/Projects/perlprojects/CitrusPerl.proj/messup.png

I used the following structure from man Wx, but I really like your structure and plan to plagiarize it in the future! :)

use Wx; my $app = Wx::SimpleApp->new; my $frame = Wx::Frame->new( undef, -1, 'Hello, world!' ); $frame->Show; $app->MainLoop;

I considered using the file dialog, but went with the text entry dialog as a short cut. The file dialog is the better way to go.

The original script used Wx::Colour which was not found in the "standard" Citrus Perl @INC, but was found in a deeper directory. Thus the use lib '......' to point to the module.

Thanks again for the input. I have a lot to continue working with.

James


In reply to Re: Screen Capture via wxPerl Script by jmlynesjr
in thread Screen Capture via wxPerl Script by jmlynesjr

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 studying the Monastery: (6)
    As of 2018-12-14 23:46 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How many stories does it take before you've heard them all?







      Results (69 votes). Check out past polls.

      Notices?