Re: [perl-win32-gui-users] Re: repeating keystrokes in Win32::GUI Textfield
I just had a user that upgraded to WinXP report this same thing on a program I wrote, that works fine on Win2K. Using Win32::GUI 0.0.668, and Perl 5.6 or 5.6.1 (I'm using 5.8 now, but I'm not sure which version of Perl the user is running). I have no clue why this would happen, nor am I desirous of upgrading to XP to find out why help! Sounds like there must be some interaction between Win32::GUI and WinXP (I don't use Win32::GUI::Loft in that program) that is causing keystrokes to be seen twice. Daniel Quinlan wrote: I'm using Win32::GUI and Win32::GUI::Loft using Perl Dev Kit 5.0 on Windows XP Home. The problem I'm experiencing is with a Textfield element. When running the program, 90% of the keystrokes I type into the textfield (including backspace keystrokes) are repeated twice. The effect is visible as you type, so my guess is that the program is related to my use of Win32::GUI or Win32::GUI::Loft, but I haven't changed any Loft options for the textfield other than the name and the initial text. My Checkbox elements and a RichEdit element work fine. Any ideas? Dan -- Glenn In the past, when I've had a loop that's expecially long, I've placed a Win32::GUI::DoEvents call inside it so the window doesn't appear to be be hanging. I've noticed this effect when such a loop is going. Do you by chance have a loop with DoEvents in it? (The WinXP thing may be simply a coincidence.) Sean _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
[perl-win32-gui-users] How to manage objects within a window?
I'm just working thru the *guitutx* tutorials that come with the Win32::GUI distribution (0.0.502 on W2K with 5.6.1 633) 2 questions: 1. Are the *top* and *left* options used to determine the location of an object (label, button, listbox..) in a Window? 2. Is there an ?object? manager (something like TK's geometry mgr), or is everyone else just able to do the pixel math in their head(s)? I find myself adjusting top/left alot to get things aligned Any pointers to docs are most appreciated..., Mark Sutfin
Re: [perl-win32-gui-users] Re: repeating keystrokes in Win32::GUI Textfield
Sean Healy wrote: I just had a user that upgraded to WinXP report this same thing on a program I wrote, that works fine on Win2K. Using Win32::GUI 0.0.668, and Perl 5.6 or 5.6.1 (I'm using 5.8 now, but I'm not sure which version of Perl the user is running). I have no clue why this would happen, nor am I desirous of upgrading to XP to find out why help! Sounds like there must be some interaction between Win32::GUI and WinXP (I don't use Win32::GUI::Loft in that program) that is causing keystrokes to be seen twice. Daniel Quinlan wrote: I'm using Win32::GUI and Win32::GUI::Loft using Perl Dev Kit 5.0 on Windows XP Home. The problem I'm experiencing is with a Textfield element. When running the program, 90% of the keystrokes I type into the textfield (including backspace keystrokes) are repeated twice. The effect is visible as you type, so my guess is that the program is related to my use of Win32::GUI or Win32::GUI::Loft, but I haven't changed any Loft options for the textfield other than the name and the initial text. My Checkbox elements and a RichEdit element work fine. Any ideas? Dan -- Glenn In the past, when I've had a loop that's expecially long, I've placed a Win32::GUI::DoEvents call inside it so the window doesn't appear to be be hanging. I've noticed this effect when such a loop is going. Do you by chance have a loop with DoEvents in it? (The WinXP thing may be simply a coincidence.) Indeed I do have such a loop precisely in the area in which my user complained. Seems like the WinXP thing can't be completely coincidental, but may not be the root cause I guess I'd better upgrade my "GUIprompt" window to be a full-fledged window, although if I recall, that is going to be annoying, to structure the events appropriately. Daniel -- do you have a DoEvents loop too? -- Glenn = Not everything that is counted counts, and not everything that counts can be counted. -- A. Einstein
Re: [perl-win32-gui-users] Re: repeating keystrokes in Win32::GUI Textfield
Sean Healy <[EMAIL PROTECTED]> writes: > In the past, when I've had a loop that's expecially long, I've placed a > Win32::GUI::DoEvents call inside it so the window doesn't appear to be be > hanging. I've noticed this effect when such a loop is going. Do you by > chance have a loop with DoEvents in it? (The WinXP thing may be simply a > coincidence.) Yes. I call an "idle" subroutine every 0.05 seconds (when there is no other activity) and a "working" subroutine that's called when there is some activity -- those are the only two places that DoEvents is called. Both the "idle" and "working" routines are also exactly the same at the moment. (This code was actually written by the author of Win32::GUI::Loft and contributed to our project.) I'm still learning how to use Win32::GUI myself, so if you have a fix for me to try, please try to be specific. Thanks. :-) --- start of cut text -- use constant WM_APP => 0x8000; #From winuser.h (Visual Studio) use constant WM_EXITLOOP => WM_APP + 1; #From GUI.xs sub idle { my $self = shift; my ($win) = tglApp($tglWindow); local $SIG{__WARN__} = sub {};#Supress warnings from Win32::GUI print "." if(::DEBUGGING >= 3); if($win->PeekMessage()) { $win->PostMessage(WM_EXITLOOP, 0, 0) for (0..100); Win32::GUI::Dialog(); } Win32::GUI::DoEvents() while($win->PeekMessage()); Win32::GUI::DoEvents(); print "!" if(::DEBUGGING >= 3); return(1); } --- end Dan