Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Screen Capture via wxPerl Script

by Anonymous Monk
on Oct 20, 2012 at 00:37 UTC ( #1000075=note: print w/replies, xml ) Need Help??


in reply to Re: Screen Capture via wxPerl Script
in thread Screen Capture via wxPerl Script

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.

Well, I really don't know what you mean by events and "main-line code" run asynchronously. I took it to mean you're talking about the perl code, and since it doesn't use fork or threads, doesn't open any sockets or files, look all synchronous to me

Replies are listed 'Best First'.
Re^3: Screen Capture via wxPerl Script
by jmlynesjr (Hermit) on Oct 20, 2012 at 02:14 UTC

    We may be talking apples and oranges, but I am enjoying and learning from this conversation.

    My definition of "main-line code" is the stuff between my $app = Wx::SimpleApp->new; and $app->MainLoop;.

    Within this segment, the frame is created and the onPaint event handler is defined. onPaint is never called directly, but is called "asynchronously" from within the bowels of Wx. I moved the TakeScreenshot($self, $file); call to various places within the main-line and onPaint segments with various results. Usually only capturing the background window not the sample window.

    The sample screen is drawn by a continuous block of code(within the onPaint event handler)immediately followed by TakeScreenshot. On my PC, the screen doesn't paint completely in one motion, but paints the three circles and the first block of text followed by a blink and the next two blocks of text. Given this, it is strange that some of the time a complete screen is captured to the file. Mostly only the three circles and first block of text gets captured. All the drawing code runs before the capture code is called, so the $64,000 question is why is only a partial screen being captured(most of the time)? As Spock would say, "illogical".

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2018-09-21 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (190 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!