You can subscribe to this list here.
2001 |
Jan
(226) |
Feb
(139) |
Mar
(156) |
Apr
(95) |
May
(181) |
Jun
(166) |
Jul
(80) |
Aug
(59) |
Sep
(69) |
Oct
(83) |
Nov
(142) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(91) |
Mar
(76) |
Apr
(113) |
May
(67) |
Jun
(68) |
Jul
(37) |
Aug
(41) |
Sep
(16) |
Oct
(135) |
Nov
(51) |
Dec
(21) |
2003 |
Jan
(37) |
Feb
(36) |
Mar
(37) |
Apr
(103) |
May
(68) |
Jun
(70) |
Jul
(77) |
Aug
(12) |
Sep
(9) |
Oct
(53) |
Nov
(88) |
Dec
(63) |
2004 |
Jan
(263) |
Feb
(106) |
Mar
(36) |
Apr
(21) |
May
(21) |
Jun
(34) |
Jul
(33) |
Aug
(34) |
Sep
(35) |
Oct
(21) |
Nov
(43) |
Dec
(63) |
2005 |
Jan
(28) |
Feb
(42) |
Mar
(29) |
Apr
(14) |
May
(41) |
Jun
(20) |
Jul
(65) |
Aug
(136) |
Sep
(41) |
Oct
(74) |
Nov
(34) |
Dec
(94) |
2006 |
Jan
(85) |
Feb
(94) |
Mar
(68) |
Apr
(103) |
May
(66) |
Jun
(51) |
Jul
(24) |
Aug
(56) |
Sep
(57) |
Oct
(85) |
Nov
(73) |
Dec
(68) |
2007 |
Jan
(59) |
Feb
(32) |
Mar
(13) |
Apr
(32) |
May
(36) |
Jun
(36) |
Jul
(64) |
Aug
(35) |
Sep
(19) |
Oct
(10) |
Nov
(13) |
Dec
(20) |
2008 |
Jan
(26) |
Feb
(41) |
Mar
(19) |
Apr
(24) |
May
(16) |
Jun
(33) |
Jul
(34) |
Aug
(4) |
Sep
(11) |
Oct
|
Nov
(26) |
Dec
(23) |
2009 |
Jan
(5) |
Feb
(2) |
Mar
(21) |
Apr
(16) |
May
(13) |
Jun
(6) |
Jul
(34) |
Aug
(2) |
Sep
(1) |
Oct
(7) |
Nov
(5) |
Dec
(24) |
2010 |
Jan
(3) |
Feb
(5) |
Mar
(6) |
Apr
(6) |
May
(14) |
Jun
(6) |
Jul
(1) |
Aug
(12) |
Sep
(10) |
Oct
(9) |
Nov
|
Dec
(2) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
(30) |
Apr
(1) |
May
(2) |
Jun
(5) |
Jul
(3) |
Aug
(2) |
Sep
(3) |
Oct
|
Nov
(6) |
Dec
|
2012 |
Jan
|
Feb
(10) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(4) |
2013 |
Jan
(5) |
Feb
(3) |
Mar
|
Apr
(3) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(7) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(5) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Andrew K. <aki...@gs...> - 2001-06-27 13:03:17
|
When you click the X, you send a terminate to the "window" loop but your = for loop is still going since it doesn't know about the window being = terminated. I don't know if this is the best solution, but you could add: exit if !$W->IsEnabled(); just before the sleep (2) command. Therefore, when your window goes away, = your script will exit. If you just want to exit the for loop and continue = use: last if $W->IsEnabled(); Andrew Kincaid Lead PC Systems Specialist, IS&T Georgia State University aki...@gs...=20 >>> lb...@li... 06/27/01 08:34AM >>> Help please, I am trying get this program to completely terminate when I click on the = X=20 in the top right hand corner but it is not working. I have played = around=20 with a few different ways to use peekmessage and doevents with no luck. Can some one help me. I do not see anything in the archives like this. Thanks, Louis use Win32::GUI; $W =3D new Win32::GUI::Window( -title =3D> "Win32::GUI::Louis Test", -left =3D> 100, -top =3D> 100, -width =3D> 200, -height =3D> 150, -font =3D> $F, -name =3D> "Window", ); $tX =3D 5; $W->AddLabel( -name =3D> "Fatal_Label", -text =3D> "Fatal:", -left =3D> $tX, -top =3D> 5, ); $tX =3D 5; $tY +=3D $W->Fatal_Label->Height + 10; $W->AddLabel( -name =3D> "Warning_Label", -text =3D> "Warning:", -left =3D> $tX, -top =3D> $tY, ); $tX_Fatal +=3D $W->Fatal_Label->Width + 27; $tX_Warning +=3D $W->Warning_Label->Width + 10; $W->Show; for ($i =3D 0; $i <=3D10; $i++) { $W->AddTextfield( -name =3D> "Fatal_Text", -left =3D> $tX_Fatal, -top =3D> 5, -width =3D> 80, -height =3D> 20, -text =3D> $i, ); $W->AddTextfield( -name =3D> "Warning_Text", -left =3D> $tX_Warning, -top =3D> $tY, -width =3D> 80, -height =3D> 20, -text =3D> "test2", ); print "$i\n"; Win32::GUI::PeekMessage(0,0,0); Win32::GUI::DoEvents() < 0; sleep(2); } sub W_Terminate {-1;} -- =A4=A4=BA=B0`=B0=BA=A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA= =A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li...=20 =A4=B0`=B0http://www.lightbridge.com=20 =A4=A4=BA=B0`=B0=BA=A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA= =A4=F8, ,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li...=20 http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Johan L. <jo...@ba...> - 2001-06-27 13:00:51
|
Louis wrote: >$W = new Win32::GUI::Window( > -title => "Win32::GUI::Louis Test", > -left => 100, > -top => 100, > -width => 200, > -height => 150, > -font => $F, > -name => "Window", >); Note the -name. >sub W_Terminate {-1;} Note the name. You use the name of a variable you happened to assign the the object to. All event handlers are named after the -name option. This should work better: sub Window_Terminate {-1;} I often find that my event code never gets run and wonder why. Then I insert a little print "!"; in the handler sub and find that the event is never triggered at all... Oops :/ It is almost always caused by a misspelling or misunderstanding of the control name. BTW, it may be a test thing, but "Window" is a lousy name for a lot of reasons, some actually important. I discuss this in The GUI Loft User Manual: <http://www.bahnhof.se/~johanl/perl/Loft/manual.html#control%20names%20are%20global> /J ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |
From: Louis B. <lb...@li...> - 2001-06-27 12:34:42
|
Help please, I am trying get this program to completely terminate when I click on the X= =20 in the top right hand corner but it is not working. I have played around=20 with a few different ways to use peekmessage and doevents with no luck. Can some one help me. I do not see anything in the archives like this. Thanks, Louis use Win32::GUI; $W =3D new Win32::GUI::Window( -title =3D> "Win32::GUI::Louis Test", -left =3D> 100, -top =3D> 100, -width =3D> 200, -height =3D> 150, -font =3D> $F, -name =3D> "Window", ); $tX =3D 5; $W->AddLabel( -name =3D> "Fatal_Label", -text =3D> "Fatal:", -left =3D> $tX, -top =3D> 5, ); $tX =3D 5; $tY +=3D $W->Fatal_Label->Height + 10; $W->AddLabel( -name =3D> "Warning_Label", -text =3D> "Warning:", -left =3D> $tX, -top =3D> $tY, ); $tX_Fatal +=3D $W->Fatal_Label->Width + 27; $tX_Warning +=3D $W->Warning_Label->Width + 10; $W->Show; for ($i =3D 0; $i <=3D10; $i++) { $W->AddTextfield( -name =3D> "Fatal_Text", -left =3D> $tX_Fatal, -top =3D> 5, -width =3D> 80, -height =3D> 20, -text =3D> $i, ); $W->AddTextfield( -name =3D> "Warning_Text", -left =3D> $tX_Warning, -top =3D> $tY, -width =3D> 80, -height =3D> 20, -text =3D> "test2", ); print "$i\n"; Win32::GUI::PeekMessage(0,0,0); Win32::GUI::DoEvents() < 0; sleep(2); } sub W_Terminate {-1;} -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |
From: Johan L. <jo...@ba...> - 2001-06-27 06:30:18
|
Sean wrote: > > This is where you call DoEvents() to give the GUI a chance to handle > > messages and respond to user interaction every once in a while. Do > > this "as often as possible" to give the impression that the GUI is > > always listening to user interaction. > >So are you suggesting soemthing like this? -snip- Yes, although the most typical case contains a loop in which you put the DoEvents() call. Depends on your app of course :) > > BTW, most of this has been said before a few times. Browse the > > archives for more info. > >I would, but they haven't been working for a long time I chose the word "browse" with some deliberation, thankyouverymuch :) Actually, looking through the archives is a good introduction, not only to this list, but to what problems have been solved before (no need to try this or that again, it didn't work the last time). It will take you some time, but it's worth it. /J ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |
From: <se...@la...> - 2001-06-27 00:12:33
|
On 27 Jun 2001, at 1:58, Johan Lindstrom wrote: > This is where you call DoEvents() to give the GUI a chance to handle > messages and respond to user interaction every once in a while. Do > this "as often as possible" to give the impression that the GUI is > always listening to user interaction. So are you suggesting soemthing like this? sub SomeButton_Click { # first part of long piece of code Win32::GUI::DoEvents; # second part of long piece of code Win32::GUI::DoEvents; # third part of long piece of code Win32::GUI::DoEvents; # fourth part of long piece of code } > BTW, most of this has been said before a few times. Browse the > archives for more info. I would, but they haven't been working for a long time (for example, a search on 'Win32::GUI' returns nothing (even tried searching on each part separately, and without capitalization, etc.), even though I'm fairly confident that that term is somewhere in one of the posts. |
From: Piske, H. <Har...@bo...> - 2001-06-27 00:10:09
|
> BTW, most of this has been said before a few times. Browse > the archives for > more info. Yep! I was just about to re-post this (because we know by now that the archive search does not really find all you're looking for): ================================================== > Sent: Wednesday, March 28, 2001 15:17 > To: 'per...@li...' > Subject: RE: [perl-win32-gui-users] Looping Question [...] The basic knack is Win32::GUI::DoEvents() while Win32::GUI::PeekMessage(0,0,0); You can call this even from inside an event. Here's a complete example, taking care of avoiding restarting the busy loop before it completed, and of aborting the busy loop when the program terminates. have fun, Harald use Win32::GUI; $Main = new Win32::GUI::Window (-name => 'Main', -pos => [100, 100], -size => [400, 300]); sub Main_Terminate {-1} $Main->AddButton (-name => $_ = 'Click', -text => $_, -pos => [160, 80]); sub Click_Click {$Main->MessageBox ("Don't do that")} $Main->AddButton (-name => $_ = 'Busy', -text => $_, -pos => [160, 120]); sub Busy_Click { return 0 if $busy++; for ($i = 0; $i < 1e5; $i++) { print "$i\r"; while (Win32::GUI::PeekMessage(0,0,0)) { return -1 if Win32::GUI::DoEvents() < 0; } } $busy = 0; } $Main->Show (); Win32::GUI::Dialog (); |
From: Johan L. <jo...@ba...> - 2001-06-26 23:59:03
|
Sean wrote: >$keep_running. So wouldn't it be easier just to use Dialog and have >that event return -1? In most cases, yes. I would guess that Dialog() is a tighter and more efficient loop than you can roll on your own in Perl. What Dialog and DoEvents actually do is this: they process GUI messages that makes the window respond to things the user does, like moving focus, animating buttons as you click them, etc. If you use neither of these subs, the window will be visible but totally "dead". When the Dialog message loop triggers an event, e.g. btnUploadFile_Click, the control moves from this GUI message processing into your event handler. From now on, your code is executing, not the code keeping the GUI responsive to the user. So what if you have to do a _lot_ of stuff before you can return from the event handler? In this case, your code is executing for a long time, the GUI message code isn't executing at all; the GUI is "dead". This is where you call DoEvents() to give the GUI a chance to handle messages and respond to user interaction every once in a while. Do this "as often as possible" to give the impression that the GUI is always listening to user interaction. BTW, most of this has been said before a few times. Browse the archives for more info. /J ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |
From: Glenn L. <Gle...@ne...> - 2001-06-26 23:50:41
|
Useful for the case when you want to do things that are not window driven, and don't want to fork them into a separate process. Then the GUI becomes less responsive (because you are doing something else sometimes), but, as long as the chunks of something else are not too big, it need not become too unresponsive. So then you can interrupt your things that are not window driven to respond to the user's events. $keep_running = 1; while ($keep_running) { Win32::GUI::DoEvents; do something_else; } se...@la... wrote: > IN the documentation, I find this about DoEvents: > > Just like Dialog(), but returns when there are no more events to > process. > > So does that mean that if you leave your window alone, control will > return to the script? So to keep your script from exiting as soon as > you stop clicking buttons, etc. you'd have to do something like this: > > $keep_running = 1; > > Win32::GUI::DoEvents while ($keep_running); > > and then do something in one of your events that changes > $keep_running. So wouldn't it be easier just to use Dialog and have > that event return -1? I guess what I'm really asking here is, what > are the pros and cons of DoEvents over Dialog? And if someone could > provide an example of a script that uses DoEvents, that would be > good. > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- Glenn ===== Due to the current economic situation, the light at the end of the tunnel will be turned off until further notice. |
From: <se...@la...> - 2001-06-26 23:33:18
|
IN the documentation, I find this about DoEvents: Just like Dialog(), but returns when there are no more events to process. So does that mean that if you leave your window alone, control will return to the script? So to keep your script from exiting as soon as you stop clicking buttons, etc. you'd have to do something like this: $keep_running = 1; Win32::GUI::DoEvents while ($keep_running); and then do something in one of your events that changes $keep_running. So wouldn't it be easier just to use Dialog and have that event return -1? I guess what I'm really asking here is, what are the pros and cons of DoEvents over Dialog? And if someone could provide an example of a script that uses DoEvents, that would be good. |
From: Johan L. <jo...@ba...> - 2001-06-26 22:01:10
|
Andrew wrote: >Forgive me if this is an obvious answer, but, I can't find any routines to >initiate a shutdown/reboot. I hope this question is appropriate for this >list seeing as I will have to use Win32::GUI :) Almost; you can use the Win32 module: http://www.perlmonks.org/index.pl?node_id=38912 /J ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |
From: Andrew K. <aki...@gs...> - 2001-06-26 21:48:00
|
Using your exact code on a Windows 95B and a Windows 98SE machine running = Activestate Perl v.5.6.1.626 and Win32::GUI 0.0.558, I added the following = lines to the end of your code: $W =3D new Win32::GUI::Window( -title =3D> "Title Here", -left =3D> 100,=20 -top =3D> 100,=20 -width =3D> 400,=20 -height =3D> 400, -style =3D> WS_OVERLAPPEDWINDOW, -menu =3D> $mmenu, -name =3D> "Window", ); $W->Show(); Win32::GUI::Dialog(); and it ran fine. I also used -menu =3D> $smenu and it worked fine as = well. I'm not sure what to say unless you want to send more or all of = your code. Andrew Kincaid Lead PC Systems Specialist, IS&T Georgia State University aki...@gs...=20 >>> Gle...@ne... 06/19/01 09:07PM >>> Hi, Is there a difference between Win 9x and NT for putting a menu on a window using Win32::GUI? I added a bunch of menus to my application, and they show up fine on NT, but they don't appear at all on Win 98. In fact, at first they caused perl to crash on Win 98... but upgrading to build 626 seems to have cured the bad memory reference, but the menus don't appear. Curiously, the floating menu that I added to my NotifyIcon does appear on Win98. Here's my menu definition, in case there is something obviously wrong with it.... my $mmenu =3D new Win32::GUI::Menu ( "&File" =3D> "FileMenu", ">New &Location" =3D> "NewLoc", ">New &ISP" =3D> "NewISP", ">New &Phone Number" =3D> "NewNum", ">-" =3D> 0, ">E&xit" =3D> "ExitNow", "&Edit" =3D> "EditMenu", ">Edit Selected &Location" =3D> "EditLoc", ">Edit Selected &ISP" =3D> "EditISP", ">Edit Selected &Phone Number" =3D> "EditNum", "&Options" =3D> "OptMenu", "&Dialing" =3D> "DialMenu", ">&Dial" =3D> "DialNow", ">&Hangup" =3D> "HangupNow", ">&Launch Email" =3D> "LaunchNow", "&Help" =3D> "HelpMenu", ">&Help Text" =3D> "HelpNow", ">&About" =3D> "AboutNow", ">-" =3D> 0, ">Show &Debug Window" =3D> "DebugNow", ); $smenu =3D new Win32::GUI::Menu ( "&Dialing" =3D> "sDialMenu", ">&Dial" =3D> "sDialNow", ">&Hangup" =3D> "sHangupNow", ">&Launch Email" =3D> "sLaunchNow", ">-" =3D> 0, ">&Bring to Front" =3D> "sForeground", ); -- Glenn =3D=3D=3D=3D=3D Due to the current economic situation, the light at the end of the tunnel will be turned off until further notice. _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li...=20 http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Andrew K. <aki...@gs...> - 2001-06-26 21:14:42
|
In the Win32::GUI distribution, in the samples directory, there is an = example script called "ofn.pl" which demonstrates Win32::GUI::GetOpenFilena= me. If you don't already have the Win32::GUI distribution, I recommend = downloading it from: http://dada.perl.it/Win32-GUI-0.0.558.tar.gz Hope that helps! Andrew Kincaid Lead PC Systems Specialist, IS&T Georgia State University aki...@gs... >>> ho...@ip... 06/20/01 12:33PM >>> Hei, Is there a way to invoke Windows directory browser/selector from Perl/Tk? Thanks _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li...=20 http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users |
From: Andrew K. <aki...@gs...> - 2001-06-26 20:30:46
|
Forgive me if this is an obvious answer, but, I can't find any routines to = initiate a shutdown/reboot. I hope this question is appropriate for this = list seeing as I will have to use Win32::GUI :) I have found the InitiateShutdown stuff in Win32::AdminMisc but it says = it's for NT only. Anyone know of a package or a script that will display = a dialog box with "You need to reboot. Please select Yes to reboot now or = No to reboot later,etc .." with Yes/No boxes and then will do a "proper" = shutdown (and, of course, I need this to work on all Windows platforms..) = I can write the code for the window and the boxes, I just don't know how = to do the reboot part. Any help is GREATLY appreciated! Andrew Kincaid Lead PC Systems Specialist, IS&T Georgia State University aki...@gs...=20 |
From: Louis B. <lb...@li...> - 2001-06-26 18:35:56
|
Both yours and someone else's answer was mostly what I was looking for. In= =20 the long run I am trying to create a window with many (at most 10) lines of= =20 words. Each line will contain different text and have a number in=20 it. Ideally I would like the lines to be of different colors. A sub will= =20 run collecting the number to plug in to the lines. At the time I wrote the email I did not see the doevents() which I am=20 looking at now. And no I am just learning this widows programming. Are there any good references on line where I can learn more about this=20 type of programing in perl? Are there more examples any where? Thanks, Louis At 11:20 AM 6/26/2001 -0700, you wrote: >I don't quite see where your problem is ... do you want to know HOW to >update your window or WHEN? >As for the how, your $sb->Text("whatever"); should work fine anytime. As= for >the when, maybe you are looking for a timer so that you can update the >status bar every other second or so. > >No offence, but maybe you just need to grasp the messaging concept of >windows? I mean, when does which part of the script run and pass control >where? That can admittedly be confusing. Forgive me, if that was not what >you wanted to know: > >Your Win32::GUI::Dialog(); call (btw: where IS your Dialog() call??) passes >control to the GUI, which loops for events and calls the event handlers >(e.g. your Button_Click sub) until ANY of these subs returns a negative >number (not just Main_Terminate). A lot of those event handlers do some >default stuff, like redraw all the controls of your window when it becomes >visible. If you have an event handler that runs forever (maybe in a loop of >your own that processes a giant file line by line), then the $sb->Text("20% >done"); call does alter the status bars text property, but the redraw >message, which writes the new text onto the window for you to see never= gets >called, because your program is inside this long running sub and not= passing >control back to the GUI Dialog loop. In that case, simply call >Win32::GUI::DoEvents(); inside your script and the outstanding events will >be acted upon. > >Again, sorry if this is not what you asked for. >Have fun, >Harald > > > -----Original Message----- > > From: Louis Bohm [mailto:lb...@li...] > > Sent: Tuesday, June 26, 2001 10:53 > > To: per...@li... > > Subject: [perl-win32-gui-users] Updating a window. > > > > > > I am sure this is a really stupid question. But how do I > > update things in > > the window I create WITHOUT human intervention. > > > > Here is what I have for a script: > > use Win32::GUI; > > $main =3D Win32::GUI::Window->new( > > -name =3D> 'Main', > > -width =3D> 100, > > -height =3D> 100, > > -text =3D> 'Louis', > > ); > > $main->AddLabel( > > -name =3D> "Louis", > > -text =3D> "Hello World 1" > > ); > > $sb=3D$main->AddStatusBar( > > -name =3D> "Status" > > ); > > $sb->Text("Some data"); > > $main->Show(); > > Win32::GUI::Window(); > > > > sub Main_Terminate { > > -1; > > } > > > > sub Main_Resize { > > $sb->Move(0, $main->ScaleHeight - $sb->Height); > > $sb->Resize($main->ScaleWidth, $sb->Height); > > } > > > > > > Now what I would like to do it periodically update the text > > in the status > > bar with out the user getting involved. > > > > Thanks, > > Louis > > > > -- > > =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`= =B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 > > =A4=B0`=B0Lightbridge, Inc > > =A4=B0`=B067 South Bedford St. > > =A4=B0`=B0Burlington MA 01832 > > =A4=B0`=B0781.359.4795 mailto:lb...@li... > > =A4=B0`=B0http://www.lightbridge.com > > =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`= =B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 > > > > > > _______________________________________________ > > Perl-Win32-GUI-Users mailing list > > Per...@li... > > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |
From: Peter E. <Pet...@at...> - 2001-06-26 18:24:04
|
It sounds like you want a timer. ### untested @stuff =3D (0 .. 1000); $main->AddTimer("Timer", 1000); ### once every second. sub Timer_Timer { $x++; $sb->Text("Incrementing value: $stuff[$x]"); } > -----Original Message----- > From: Louis Bohm [mailto:lb...@li...] > Sent: Tuesday, June 26, 2001 1:53 PM > To: per...@li... > Subject: [perl-win32-gui-users] Updating a window. >=20 >=20 > I am sure this is a really stupid question. But how do I=20 > update things in=20 > the window I create WITHOUT human intervention. >=20 > Here is what I have for a script: > use Win32::GUI; > $main =3D Win32::GUI::Window->new( > -name =3D> 'Main', > -width =3D> 100, > -height =3D> 100, > -text =3D> 'Louis', > ); > $main->AddLabel( > -name =3D> "Louis", > -text =3D> "Hello World 1" > ); > $sb=3D$main->AddStatusBar( > -name =3D> "Status" > ); > $sb->Text("Some data"); > $main->Show(); > Win32::GUI::Window(); >=20 > sub Main_Terminate { > -1; > } >=20 > sub Main_Resize { > $sb->Move(0, $main->ScaleHeight - $sb->Height); > $sb->Resize($main->ScaleWidth, $sb->Height); > } >=20 >=20 > Now what I would like to do it periodically update the text=20 > in the status=20 > bar with out the user getting involved. >=20 > Thanks, > Louis >=20 > -- > = =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 > =A4=B0`=B0Lightbridge, Inc > =A4=B0`=B067 South Bedford St. > =A4=B0`=B0Burlington MA 01832 > =A4=B0`=B0781.359.4795 mailto:lb...@li... > =A4=B0`=B0http://www.lightbridge.com > = =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 >=20 >=20 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >=20 |
From: Piske, H. <Har...@bo...> - 2001-06-26 18:20:16
|
I don't quite see where your problem is ... do you want to know HOW to update your window or WHEN?=20 As for the how, your $sb->Text("whatever"); should work fine anytime. = As for the when, maybe you are looking for a timer so that you can update the status bar every other second or so. No offence, but maybe you just need to grasp the messaging concept of windows? I mean, when does which part of the script run and pass = control where? That can admittedly be confusing. Forgive me, if that was not = what you wanted to know: Your Win32::GUI::Dialog(); call (btw: where IS your Dialog() call??) = passes control to the GUI, which loops for events and calls the event handlers (e.g. your Button_Click sub) until ANY of these subs returns a negative number (not just Main_Terminate). A lot of those event handlers do some default stuff, like redraw all the controls of your window when it = becomes visible. If you have an event handler that runs forever (maybe in a = loop of your own that processes a giant file line by line), then the = $sb->Text("20% done"); call does alter the status bars text property, but the redraw message, which writes the new text onto the window for you to see never = gets called, because your program is inside this long running sub and not = passing control back to the GUI Dialog loop. In that case, simply call Win32::GUI::DoEvents(); inside your script and the outstanding events = will be acted upon. Again, sorry if this is not what you asked for. Have fun, Harald > -----Original Message----- > From: Louis Bohm [mailto:lb...@li...] > Sent: Tuesday, June 26, 2001 10:53 > To: per...@li... > Subject: [perl-win32-gui-users] Updating a window. >=20 >=20 > I am sure this is a really stupid question. But how do I=20 > update things in=20 > the window I create WITHOUT human intervention. >=20 > Here is what I have for a script: > use Win32::GUI; > $main =3D Win32::GUI::Window->new( > -name =3D> 'Main', > -width =3D> 100, > -height =3D> 100, > -text =3D> 'Louis', > ); > $main->AddLabel( > -name =3D> "Louis", > -text =3D> "Hello World 1" > ); > $sb=3D$main->AddStatusBar( > -name =3D> "Status" > ); > $sb->Text("Some data"); > $main->Show(); > Win32::GUI::Window(); >=20 > sub Main_Terminate { > -1; > } >=20 > sub Main_Resize { > $sb->Move(0, $main->ScaleHeight - $sb->Height); > $sb->Resize($main->ScaleWidth, $sb->Height); > } >=20 >=20 > Now what I would like to do it periodically update the text=20 > in the status=20 > bar with out the user getting involved. >=20 > Thanks, > Louis >=20 > -- > = =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 > =A4=B0`=B0Lightbridge, Inc > =A4=B0`=B067 South Bedford St. > =A4=B0`=B0Burlington MA 01832 > =A4=B0`=B0781.359.4795 mailto:lb...@li... > =A4=B0`=B0http://www.lightbridge.com > = =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 >=20 >=20 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >=20 |
From: Glenn L. <Gle...@ne...> - 2001-06-26 18:16:43
|
If, by "without human intervention" and "periodically", you mean that the= re is no GUI event which triggers the need to update the status bar text, then = the answer to your question depends on what does trigger the need to update t= he status bar text. If "periodically" is truely the answer, that you want to wake up periodic= ally, and execute some code to determine what the status bar text should curren= tly be, then perhaps the Win32::GUI::Timer is what you are looking for. Louis Bohm wrote: > I am sure this is a really stupid question. But how do I update things= in > the window I create WITHOUT human intervention. > > Here is what I have for a script: > use Win32::GUI; > $main =3D Win32::GUI::Window->new( > -name =3D> 'Main', > -width =3D> 100, > -height =3D> 100, > -text =3D> 'Louis', > ); > $main->AddLabel( > -name =3D> "Louis", > -text =3D> "Hello World 1" > ); > $sb=3D$main->AddStatusBar( > -name =3D> "Status" > ); > $sb->Text("Some data"); > $main->Show(); > Win32::GUI::Window(); > > sub Main_Terminate { > -1; > } > > sub Main_Resize { > $sb->Move(0, $main->ScaleHeight - $sb->Height); > $sb->Resize($main->ScaleWidth, $sb->Height); > } > > Now what I would like to do it periodically update the text in the stat= us > bar with out the user getting involved. > > Thanks, > Louis > > -- > =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`= =B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 > =A4=B0`=B0Lightbridge, Inc > =A4=B0`=B067 South Bedford St. > =A4=B0`=B0Burlington MA 01832 > =A4=B0`=B0781.359.4795 mailto:lb...@li... > =A4=B0`=B0http://www.lightbridge.com > =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`= =B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- Glenn =3D=3D=3D=3D=3D Due to the current economic situation, the light at the end of the tunnel will be turned off until further notice. |
From: Louis B. <lb...@li...> - 2001-06-26 17:53:51
|
I am sure this is a really stupid question. But how do I update things in= =20 the window I create WITHOUT human intervention. Here is what I have for a script: use Win32::GUI; $main =3D Win32::GUI::Window->new( -name =3D> 'Main', -width =3D> 100, -height =3D> 100, -text =3D> 'Louis', ); $main->AddLabel( -name =3D> "Louis", -text =3D> "Hello World 1" ); $sb=3D$main->AddStatusBar( -name =3D> "Status" ); $sb->Text("Some data"); $main->Show(); Win32::GUI::Window(); sub Main_Terminate { -1; } sub Main_Resize { $sb->Move(0, $main->ScaleHeight - $sb->Height); $sb->Resize($main->ScaleWidth, $sb->Height); } Now what I would like to do it periodically update the text in the status=20 bar with out the user getting involved. Thanks, Louis -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |
From: Peter E. <Pet...@at...> - 2001-06-26 17:47:58
|
that did the trick. thanks! > -----Original Message----- > From: Glenn Linderman [mailto:Gle...@ne...] > Sent: Tuesday, June 26, 2001 1:34 PM > To: per...@li... > Subject: Re: [perl-win32-gui-users] Disable menu item? > > > $Window->Menu -> {'SortNot'} -> Enabled ( 0 ); > > > Peter Eisengrein wrote: > > > How can you disable (grey-out) an item in a menu? I don't > see anything in > > the docs and it has ignored everything I have tried, > including the obvious: > > > > $Window->Menu->{MenuItem}->Disable(); > > > > _______________________________________________ > > Perl-Win32-GUI-Users mailing list > > Per...@li... > > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > -- > Glenn > ===== > Due to the current economic situation, the light at the > end of the tunnel will be turned off until further notice. > > > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > |
From: Glenn L. <Gle...@ne...> - 2001-06-26 17:31:04
|
$Window->Menu -> {'SortNot'} -> Enabled ( 0 ); Peter Eisengrein wrote: > How can you disable (grey-out) an item in a menu? I don't see anything in > the docs and it has ignored everything I have tried, including the obvious: > > $Window->Menu->{MenuItem}->Disable(); > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- Glenn ===== Due to the current economic situation, the light at the end of the tunnel will be turned off until further notice. |
From: Peter E. <Pet...@at...> - 2001-06-26 16:19:42
|
How can you disable (grey-out) an item in a menu? I don't see anything in the docs and it has ignored everything I have tried, including the obvious: $Window->Menu->{MenuItem}->Disable(); |
From: Louis B. <lb...@li...> - 2001-06-26 15:12:14
|
I originally found the file win32-gui-0.0.558.tar.gz on the web site=20 http://dada.perl.it/. Uncompressing that file you will find a tutorial=20 Win32-GUI-0.0.558/docs/tut/guitut1.html. Oh about 30 or 40 lines down from= =20 top. Louis At 06:10 AM 6/26/2001 -0400, you wrote: >On Tue, 26 Jun 2001 08:45:20 -0400, Louis Bohm said: > >| I found that this line was in error: >| $main->AddLabel(-text =3D> "Hello World"); >| >| I needed to include the -name as shown bellow: >| $main->AddLabel( >| -name =3D> "Test", >| -text =3D> "Hello World", >| ); >| >| What bothers me about this is that I pulled the top line right from >| the=3D20 >| documentation. I am sure no one has time but the docs should be >| changed=3D20 >| accordingly. > >What documentation had you found this? > >regards, > >erick > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |
From: Erick B. <er...@je...> - 2001-06-26 14:12:38
|
On Tue, 26 Jun 2001 08:45:20 -0400, Louis Bohm said: | I found that this line was in error: | $main->AddLabel(-text => "Hello World"); | | I needed to include the -name as shown bellow: | $main->AddLabel( | -name => "Test", | -text => "Hello World", | ); | | What bothers me about this is that I pulled the top line right from | the=20 | documentation. I am sure no one has time but the docs should be | changed=20 | accordingly. What documentation had you found this? regards, erick |
From: Johan L. <jo...@ba...> - 2001-06-26 12:49:45
|
Louis wrote: > $main->AddLabel(-text => "Hello, world"); Add a -name option and you're fine. All controls must have a name. >I am sure the error is not in perl or your win-gui module Actually, I think it's something that could be fixed in the Win32::GUI module. If I remember correctly, all controls are assumed to actually have a -name, and when you don't pass one along... Perl.exe should preferrably never, ever crash in that way. /J ------ ---- --- -- -- -- - - - - - Johan Lindström Boss Casinos Sourcerer jo...@ba... http://www.bahnhof.se/~johanl/ If the only tool you have is a hammer, everything tends to look like a nail |
From: Louis B. <lb...@li...> - 2001-06-26 12:46:01
|
I found that this line was in error: $main->AddLabel(-text =3D> "Hello World"); I needed to include the -name as shown bellow: $main->AddLabel( -name =3D> "Test", -text =3D> "Hello World", ); What bothers me about this is that I pulled the top line right from the=20 documentation. I am sure no one has time but the docs should be changed=20 accordingly. Louis At 08:31 AM 6/26/2001 -0400, you wrote: >I am getting perl.exe - Application Error when trying to run the=20 >following code: > use Win32::GUI; > $main =3D Win32::GUI::Window->new( > -name =3D> 'Main', > -width =3D> 100, > -height =3D> 100, > ); > $main->AddLabel(-text =3D> "Hello, world"); > $main->Show(); > Win32::GUI::Dialog(); > > sub Main_Terminate { > -1; > } > >I am sure the error is not in perl or your win-gui module but I do not=20 >know what it is or how to go about finding out what is causing it. I have= =20 >shutdown everything I am running to see if something else is effecting it= =20 >but I am not getting any where. > >If anyone has any suggestions that would be great? >OS: Win2K Pro >Perl: ActivePerl 5.6.0 build 623 > >Thanks, >Louis > >-- >=A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 >=A4=B0`=B0Lightbridge, Inc >=A4=B0`=B067 South Bedford St. >=A4=B0`=B0Burlington MA 01832 >=A4=B0`=B0781.359.4795 mailto:lb...@li... >=A4=B0`=B0http://www.lightbridge.com >=A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 > > >_______________________________________________ >Perl-Win32-GUI-Users mailing list >Per...@li... >http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 =A4=B0`=B0Lightbridge, Inc =A4=B0`=B067 South Bedford St. =A4=B0`=B0Burlington MA 01832 =A4=B0`=B0781.359.4795 mailto:lb...@li... =A4=B0`=B0http://www.lightbridge.com =A4=A4=BA=B0`=B0=BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0= =BA=A4=F8,=B8=B8,=F8=A4=BA=B0`=B0=BA=A4=F8=F8=A4=BA=B0`=B0=BA=A4 |