Re: [perl-win32-gui-users] Code Review?

2001-07-02 Thread Johan Lindstrom
Morbus wrote: - do you see any Window related handles that I've missed? I'd much rather define every single possible event than miss some and hope that the code figures it out. Does my code always bring the Window to the top (in practice, sometimes it does, sometimes it doesn't)? J

Re: [perl-win32-gui-users] an array of hashes

2001-07-02 Thread Erick Bourgeois
On Mon, 02 Jul 2001 17:13:55 -0700, Jeremy Aiyadurai said: .. ~snip~ | push(@messageInfoList,%messageInfo); # pushing hash into the array. | } Instead of putting the hash into the array, try inserting a reference to it. That is, push(@messageInfoList, \%messageIn

[perl-win32-gui-users] an array of hashes

2001-07-02 Thread Jeremy Aiyadurai
hi thanks for all your help in the past how do i go about creating an array of hashes eg. suppose i want to get information about email messages, and each message has a subject, date, from etc. i want to store the following in a hash. But there are more than one messages, therefore, i have to c

RE: [perl-win32-gui-users] NewbieWin32::GUI Dialog() Question

2001-07-02 Thread Piske, Harald
The infamous 0.99 build ... Go to either Activestate or dada.perl.it and find the latest version. Sadly, the version number 0.99 looks newer to the Activestate ppm installer than the current version 0.0.558, so it will refuse to update it. Instead, do - ppm remove Win32-GUI - ppm install Win32-

[perl-win32-gui-users] NewbieWin32::GUI Dialog() Question

2001-07-02 Thread John Watson
Hi, This is part of my first Win32-Gui program that has been converted from a non-gui program. When I run it, I get a couple of the following error messages that point to the Win32:::GUI::Dialog() line. I also get the message whenever the cursor touches the window. But other than that, it runs fin

Re: [perl-win32-gui-users] Code Review?

2001-07-02 Thread Morbus Iff
>* The $SETTINGS global hash ref isn't documented anywhere and could >probably be passed to the various subs instead. Globals config variables >has always bitten me sooner or later in the past :/ Point taken - in this case, it's part of the much larger AmphetaDesk project (at http://www.disobey.

Re: [perl-win32-gui-users] Code Review?

2001-07-02 Thread Johan Lindstrom
Morbus wrote: I'm looking for a code review of the below - mainly in the realms of Windows correctness, and what I'm missing, and so forth. The code below is a drop-able library into my AmphetaDesk (http://www.disobey.com/amphetadesk/), but could work for some other programs as well. Basically

Re: [perl-win32-gui-users] detect if window is minimized

2001-07-02 Thread Johan Lindstrom
Pete wrote: I know you can check to see if a window is shown or hidden via $Window->IsVisible but can't seem to find something similar to check if it is minimized or maximized. "The IsZoomed and IsIconic functions determine whether a given window is maximized or minimized, respectively. The Ge

[perl-win32-gui-users] detect if window is minimized

2001-07-02 Thread Peter Eisengrein
I know you can check to see if a window is shown or hidden via $Window->IsVisible but can't seem to find something similar to check if it is minimized or maximized. Thanks, Pete

Re: [perl-win32-gui-users] Help with quitting

2001-07-02 Thread Louis Bohm
Did not help me... Darn it... Louis At 04:11 PM 7/2/2001 +0200, Johan Lindstrom wrote: Louis wrote: It works but still gives an error when I exit using the exe version. Maybe I should give up on the exit thing and let people click on the windows X to exit. Try not calling exit(0). Long sho

[perl-win32-gui-users] Code Review?

2001-07-02 Thread Morbus Iff
I'm looking for a code review of the below - mainly in the realms of Windows correctness, and what I'm missing, and so forth. The code below is a drop-able library into my AmphetaDesk (http://www.disobey.com/amphetadesk/), but could work for some other programs as well. As it stands right now, I'm

Re: [perl-win32-gui-users] Help with quitting

2001-07-02 Thread Johan Lindstrom
Louis wrote: It works but still gives an error when I exit using the exe version. Maybe I should give up on the exit thing and let people click on the windows X to exit. Try not calling exit(0). Long shot but it might work. /J -- --- -- -- -- - - --- Johan Lindström

Re: [perl-win32-gui-users] Help with quitting

2001-07-02 Thread Louis Bohm
It works but still gives an error when I exit using the exe version. Maybe I should give up on the exit thing and let people click on the windows X to exit. Louis At 03:41 PM 7/2/2001 +0200, Johan Lindstrom wrote: Louis wrote: So are you saying something like this??? -snip- More like: my

Re: [perl-win32-gui-users] Help with quitting

2001-07-02 Thread Johan Lindstrom
Louis wrote: So are you saying something like this??? -snip- More like: my $EventLoop = 1; while ($EventLoop) { #some code... Win32::GUI::DoEvents() while Win32::GUI::PeekMessage(0,0,0); } sub Exit_Click { $EventLoop = 0; } Forget that Enable thing, it's cleaner with a dedicated vari

Re: [perl-win32-gui-users] Help with quitting

2001-07-02 Thread Louis Bohm
So are you saying something like this??? $close=1; while (1) { some code... Win32::GUI::DoEvents() while Win32::GUI::PeekMessage(0,0,0); exit(0) if !$W->IsEnabled(); exit(0) if $W->Enable($close); } exit(0); sub Exit_Click {$close=0;} After I build the exe using perl2exe and click on ex

Re: [perl-win32-gui-users] Help with quitting

2001-07-02 Thread Johan Lindstrom
Louis wrote: sub Exit_Click {$W->PostQuitMessage(0);} Now I know that this sub is executing because I can put a print in it and I will see it on the console window. However, it is not quitting the program. How do I do that??? Normally, you exit the Win32::GUI::Dialog event loop with the P

[perl-win32-gui-users] Help with quitting

2001-07-02 Thread Louis Bohm
I have written a nifty gui that I really like using the win32 gui module. I really have to thank the person(S) who put this all together. On to my question... I would like to design a menu containing an exit routine but it is not working. Currently I have this as my program loop while (1)