[perl-win32-gui-users] Minimized window inactive
How do I ensure that the counter continues running when the window is minimized? Thanks -snip- use strict; use Win32::GUI; my $count = 0; my $W = new Win32::GUI::Window( -left = 558, -top= 122, -width = 300, -height = 255, -name = W, -text = Test ); $W-AddLabel( -text= $count, -name= count, -left= 10, -top = 10, -width = 30, -height = 13, -foreground= 0, ); $W-AddButton( -text= start, -name= start, -left= 126, -top = 144, -width = 42, -height = 21, -foreground= 0, ); $W-Show(); Win32::GUI::Dialog(); sub start_Click { while (1) { Win32::GUI::DoEvents(); sleep 1; $count++; $W-count-Text($count); } } _ Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp
RE: [perl-win32-gui-users] Minimized window inactive
Try this: #- use strict; use Win32::GUI; my $count = 0; my $W = new Win32::GUI::Window( -left = 558, -top= 122, -width = 300, -height = 255, -name = W, -text = Test ); $W-AddLabel( -text= $count, -name= count, -left= 10, -top = 10, -width = 30, -height = 13, -foreground= 0, ); $W-AddButton( -text= start, -name= start, -left= 126, -top = 144, -width = 42, -height = 21, -foreground= 0, ); $W-AddTimer(Timer1, 0); $W-Timer1-Kill; $W-Show(); Win32::GUI::Dialog(); sub start_Click { $W-Timer1-Interval(1000); } sub Timer1_Timer { $W-count-Text(++$count); } #- -Original Message- From: carollyne courtney [mailto:[EMAIL PROTECTED] Sent: Thursday, October 17, 2002 8:35 AM To: perl-win32-gui-users@lists.sourceforge.net Subject: [perl-win32-gui-users] Minimized window inactive How do I ensure that the counter continues running when the window is minimized? Thanks -snip- use strict; use Win32::GUI; my $count = 0; my $W = new Win32::GUI::Window( -left = 558, -top= 122, -width = 300, -height = 255, -name = W, -text = Test ); $W-AddLabel( -text= $count, -name= count, -left= 10, -top = 10, -width = 30, -height = 13, -foreground= 0, ); $W-AddButton( -text= start, -name= start, -left= 126, -top = 144, -width = 42, -height = 21, -foreground= 0, ); $W-Show(); Win32::GUI::Dialog(); sub start_Click { while (1) { Win32::GUI::DoEvents(); sleep 1; $count++; $W-count-Text($count); } } _ Broadband? Dial-up? Get reliable MSN Internet Access. http://resourcecenter.msn.com/access/plans/default.asp --- This sf.net email is sponsored by: viaVerio will pay you up to $1,000 for every account that you consolidate with us. http://ad.doubleclick.net/clk;4749864;7604308;v? http://www.viaverio.com/consolidator/osdn.cfm ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
[perl-win32-gui-users] LWP + Fork + Win32::GUI
Hello, I don't know how to continue a thread that started before I joined the list so I apologize in advance: Is possible to modify LWP module in order to avoid a frozen window ? I have spent the morning searching for some solutions involving LWP, Fork and Win32::GUI. I saw in the archives for this list that some of this has been discussed before and that one question I can answer had been asked by Guillem Cunillera Wefers [EMAIL PROTECTED]. Guillem if you are still interested in how to do this, you will want to use the callback function in LWP and call the DoEvents() inside that callback. You can set the number of bytes to read before calling the function. This should allow you to use DoEvents liberally within any call to LWP. I have some questions regarding your program if you could contact me off-list I would apprecaite it. I am new to Win32::GUI and forking and am trying to do something very similar to what it looked like you were trying to do. I am attempting to take a list of links from a ListView and send them each to a child for download. I am running into lots of problems with fork and page faults that I can't seem to solve. Cheers, Michael
[perl-win32-gui-users] I'M BACK!!!
hello people! finally I'm back on this list (I had lost any hope it would happen again :-). to make a long story short, this is what happened: 1. at some point, SourceForge decided to refuse receiving mail from servers that didn't allow null sender (don't ask me why, it's some SMTP stuff that I don't grok). 2. my mail server was not allowing this, so I could not post anymore. 3. I also have a job email access, so I setup an address there just to be on this list. 4. at some point, my job's ISP decided to disallow null sender, so I was out with that address too :-( 5. some days ago, a friend of mine pointed me at a misconfiguration on my own mailserver (and I said: doh! :-) 6. I have fixed this and now everything rocks again! this gives me new thrust to keep on developing Win32::GUI. this, and the quantity of mail and messages (on IRC, PerlMonks, etc.) of people that just love this module :-) I will try to backlog the mailing list and reply to unanswered questions, a new version is in development and will be out soon. happy to be with you again, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] LWP + Fork + Win32::GUI
Michael, I did quite a bit of experimenting with Fork and Win32::GUI a while ago. The main problem I hit was perl crashed when the window closed. I guessed there was some sort of memory management problem but couldn't figure out what. Eventually I gave up and used a doevents approach (I did try Tk but this isn't thread safe so crashes as soon as a fork occurs). If you're still interested in trying fork I've attached one of the scripts I was playing with. The fork routines are in a seperate module PipeFork.pm which I've also included. The parent handles the windows events, tells the child what events have occured and the child performs the appropriate actions (in this case calculating the size of subdirectories). I'll be interested to hear if you have more success than I did. Cheers, Kev. (See attached file: fork.zip) |-+ | | Michael Alaly [EMAIL PROTECTED] | | | Sent by: | | | [EMAIL PROTECTED]| | | ceforge.net | | || | || | | 17/10/2002 15:37 | | || |-+ --| | | | To: perl-win32-gui-users@lists.sourceforge.net | | cc: | | Subject: [perl-win32-gui-users] LWP + Fork + Win32::GUI | --| Hello, I don't know how to continue a thread that started before I joined the list so I apologize in advance: Is possible to modify LWP module in order to avoid a frozen window ? I have spent the morning searching for some solutions involving LWP, Fork and Win32::GUI. I saw in the archives for this list that some of this has been discussed before and that one question I can answer had been asked by Guillem Cunillera Wefers [EMAIL PROTECTED]. Guillem if you are still interested in how to do this, you will want to use the callback function in LWP and call the DoEvents() inside that callback. You can set the number of bytes to read before calling the function. This should allow you to use DoEvents liberally within any call to LWP. I have some questions regarding your program if you could contact me off-list I would apprecaite it. I am new to Win32::GUI and forking and am trying to do something very similar to what it looked like you were trying to do. I am attempting to take a list of links from a ListView and send them each to a child for download. I am running into lots of problems with fork and page faults that I can't seem to solve. Cheers, Michael --- This sf.net email is sponsored by: viaVerio will pay you up to $1,000 for every account that you consolidate with us. http://ad.doubleclick.net/clk;4749864;7604308;v? http://www.viaverio.com/consolidator/osdn.cfm ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users attachment: fork.zip
Re: [perl-win32-gui-users] LWP + Fork + Win32::GUI
Did you try using: Win32::Shell::Execute instead of fork. I had a lot of problem with fork under win32 in the past and finally found this little gem. Alex ;) = ** * END OF MESSAGE * __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com
[perl-win32-gui-users] Double events with DoEvents
Weird effect. Using 0.0.558, I call Win32::GUI::DoEvents() manually from a main loop . I have a popup-menu on a NotifyIcon, nothing else. This is the weird thing. When I select something in the menu, the event handler gets called twice. The main loop is basically: IO::Select-select($readable, $writeable, undef, 0.1); DoEvents(); * I tried to lower the timeout value to 0.05, same thing. * Can I discard the remaining event queue if nothing else works? * Replace my DoEvents-loop with Win32::GUI::Dialog() and it works fine. Any ideas? /J -- --- -- -- -- -- - - - Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED] Latest bookmark: Perl memory management - Jan Dubois - Re lookin... http://aspn.activestate.com/ASPN/Mail/Message/895049 dmoz (1 of 8): /Computers/Programming/Languages/Ruby/ 33
Re: [perl-win32-gui-users] Double events with DoEvents
Using 0.0.558, I call Win32::GUI::DoEvents() manually from a main loop . I I've noticed it as well. I just check to see if I've $already_called: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/amphetadesk/AmphetaDesk/ lib/AmphetaDesk/OS/Windows.pm?rev=1.7content-type=text/vnd.viewcvs-markup -- Morbus Iff ( i'm the droid you're looking for ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Please Me: http://www.amazon.com/exec/obidos/wishlist/25USVJDH68554 icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
Re: [perl-win32-gui-users] Double events with DoEvents
At 16:51 2002-10-17 -0400, Morbus Iff wrote: Using 0.0.558, I call Win32::GUI::DoEvents() manually from a main loop . I I've noticed it as well. I just check to see if I've $already_called: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/amphetadesk/AmphetaDesk/ lib/AmphetaDesk/OS/Windows.pm?rev=1.7content-type=text/vnd.viewcvs-markup Great, thanks! It's too bad it's needed but it works, so long as the two events come sufficiently close to each other so the sub doesn't have time to exit. sub ::mnu_tray_config_open_Click { return(1) if(!$workaround_handler_semaphore++); system(start $program_editor $file_user_prefs); $workaround_handler_semaphore = 0; return(1); } /J -- --- -- -- -- -- - - - Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED] Latest bookmark: Atari Icon Library http://aicq.atari-users.net/iconz/ dmoz (1 of 2): ...Computers/Software/Desktop_Customization/Icons/ 137
Re: [perl-win32-gui-users] Double events with DoEvents
At 00:25 2002-10-18 +0200, Johan Lindstrom wrote: sub ::mnu_tray_config_open_Click { return(1) if(!$workaround_handler_semaphore++); Hrmm... Thinko. Remove the ! for a more solid solution :/ /J -- --- -- -- -- -- - - - Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED] Latest bookmark: Atari Icon Library http://aicq.atari-users.net/iconz/ dmoz (1 of 2): ...Computers/Software/Desktop_Customization/Icons/ 137
Re: [perl-win32-gui-users] toolbar gui loft
At 15:24 2002-10-16 -0400, Magnone, Angelo wrote: Has anyone had any success with creating a toolbar using The GUI LOFT and then act upon the different buttons clicked? How can I tell which button has been clicked? I have never used it myself, I basically positon ordinary buttons so they look like like a toolbar. But this is what the docs say about the Toolbar events: ButtonClick(INDEX) Sent when the user presses a button of the Toolbar the INDEX argument identifies the zero-based index of the pressed button So if your toolbar is called tbrTop, this is your event handler: sub tbrTop_ButtonClick { my ($index) = @_; print User clicked button ($index)\n; return(1); } /J -- --- -- -- -- -- - - - Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED] Latest bookmark: Atari Icon Library http://aicq.atari-users.net/iconz/ dmoz (1 of 2): ...Computers/Software/Desktop_Customization/Icons/ 137
Re: [perl-win32-gui-users] (no subject)
At 09:02 2002-10-16 -0700, Rodriguez, Peter wrote: I do not have a 'C' compiler on the NT machine I need to run perl on. I downloaded the NT executables for 5.8 from cpan. Is there a similar distribution for the GUI interface? Not for 5.8. ActiveState haven't released a Perl 5.8 yet, and the precompiled PPMs are for Perl 5.6. Get Perl 5.6.1 from www.activestate.com, then type C:\ppm install Win32::GUI /J -- --- -- -- -- -- - - - Johan LindströmSourcerer @ Boss Casinos [EMAIL PROTECTED] Latest bookmark: Atari Icon Library http://aicq.atari-users.net/iconz/ dmoz (1 of 2): ...Computers/Software/Desktop_Customization/Icons/ 137