From: Peter v. d. L. <lan...@fr...> - 2004-03-08 15:27:10
|
I'm using wxPerl 0.17 (wxmsw 2.4.2) on ActiveState Perl 5.6.1 with Wx::ActiveX 0.05. Windows XP SP1. I'm receiving duplicate Accelerator events (2 events for every key pressed) for most keys. The dups arrive for space & return, but not for the arrow keys. Normal menu events don't seem to be affected. I have adapted the wxwmplayer.pl sample to show the problem. Keep the cmd window open while running and press the space, return and arrow keys. Modified sample code: http://wolkendek.nl/wx/bug.pl Regards, Peter |
From: Peter v. d. L. <la...@fr...> - 2004-03-22 17:28:36
|
> I'm using wxPerl 0.17 (wxmsw 2.4.2) on ActiveState Perl 5.6.1 with > Wx::ActiveX 0.05. Windows XP SP1. > > I'm receiving duplicate Accelerator events (2 events for every key > pressed) for most keys. The dups arrive for space & return, but not for > the arrow keys. Normal menu events don't seem to be affected. > > I have adapted the wxwmplayer.pl sample to show the problem. Keep the > cmd window open while running and press the space, return and arrow > keys. > > Modified sample code: http://wolkendek.nl/wx/bug.pl Guys, I haven't had any feedback on this problem. Still it's very real and my workaround (not accepting another accelerator within 0.25s of the last) is giving me problems. Any help or feedback would be appreciated. The problem disappears when I remove the Wx::ActiveX code so it must be something in there, right? I'm using the binary packages from the wxPerl site. Regards, Peter |
From: DH <cra...@ya...> - 2004-03-23 18:35:51
|
> > > > Modified sample code: http://wolkendek.nl/wx/bug.pl What's with Ctrl-A $mhelp->Append( $ID_ABOUT, "&About...\tCtrl-A", "Show about dialog" ); $maction->Append( $ID_PAUSE, "p&Ause...\tCtrl-A", "Pause" ); What that's supposed to do is AUTOMAGICALLY send an event (the same as activating the menu item) whenever you hit Ctrl-A You can't have two of them. > The problem disappears when I remove the Wx::ActiveX code so it must be > something in there, right? no __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html |
From: Peter v. d. L. <la...@fr...> - 2004-03-23 19:02:01
|
> >> > >> > Modified sample code: http://wolkendek.nl/wx/bug.pl > > What's with Ctrl-A > > $mhelp->Append( $ID_ABOUT, "&About...\tCtrl-A", "Show about dialog" ); > $maction->Append( $ID_PAUSE, "p&Ause...\tCtrl-A", "Pause" ); Oops, DH thanks for looking at my problem and apologies for using a screwed up example (I thought I'd used a clean one as the base but apparently I had messed this one up a few months ago) :( But... I tried it again with a real clean sample from: http://search.cpan.org/src/GMPASSOS/Wx-ActiveX-0.05/demo/wxWMPlayer.pl And added this extremely basic code to it: # ADDED by JPL: Create a few accelerators use Wx qw(wxACCEL_NORMAL WXK_RIGHT WXK_RETURN ); use Wx::Event qw(EVT_MENU); $this->SetAcceleratorTable( Wx::AcceleratorTable->new( ( [ wx_ACCEL_NORMAL, ' ', 1000], [ wx_ACCEL_NORMAL, WXK_RETURN, 1001], [ wx_ACCEL_NORMAL, WXK_RIGHT, 1002] ))); EVT_MENU($this, -1, \&OnAccel); --- cut ---- # Added by JPL: Handle Accelerator events sub OnAccel { my($this,$event)=@_; print "Got accelerator event, id=",$event->GetId(),"\n"; } The full code is again at http://wolkendek.nl/wx/bug2.pl The new code *still* displays the problem I described. The space and return keys are duplicated, the right arrow is not... (messages are printed in the console window). >> The problem disappears when I remove the Wx::ActiveX code so it must >> be something in there, right? > > no Explain, please... Regards, Peter |
From: Peter v. d. L. <lan...@fr...> - 2004-03-23 19:18:19
|
I just noticed that the problem only occurs when the demo is playing a video. (it needs movie.mpg in the bin dir) If I stop the movie playing the events stop being repeated and when I start the program again they do not reappear. My real project (a remote controlled video player) is a lot more complicated than this and show this problem all the time. I tried to show it in a minimal example (per the list guidelines). I'm puzzled but I still think it must be in the Wx::ActiveX code somewhere. It would be nice if someone could reproduce this though... Regards, Peter >>> > Modified sample code: http://wolkendek.nl/wx/bug.pl >> >> What's with Ctrl-A >> >> $mhelp->Append( $ID_ABOUT, "&About...\tCtrl-A", "Show about dialog" >> ); >> $maction->Append( $ID_PAUSE, "p&Ause...\tCtrl-A", "Pause" ); > > Oops, DH thanks for looking at my problem and apologies for using a > screwed up example (I thought I'd used a clean one as the base but > apparently I had messed this one up a few months ago) :( > > But... > > I tried it again with a real clean sample from: > > http://search.cpan.org/src/GMPASSOS/Wx-ActiveX-0.05/demo/wxWMPlayer.pl > > And added this extremely basic code to it: > > # ADDED by JPL: Create a few accelerators > use Wx qw(wxACCEL_NORMAL WXK_RIGHT WXK_RETURN ); > use Wx::Event qw(EVT_MENU); > > $this->SetAcceleratorTable( Wx::AcceleratorTable->new( ( > [ wx_ACCEL_NORMAL, ' ', 1000], > [ wx_ACCEL_NORMAL, WXK_RETURN, 1001], > [ wx_ACCEL_NORMAL, WXK_RIGHT, 1002] ))); > > EVT_MENU($this, -1, \&OnAccel); > > --- cut ---- > > # Added by JPL: Handle Accelerator events > sub OnAccel { > my($this,$event)=@_; > > print "Got accelerator event, id=",$event->GetId(),"\n"; > } > > The full code is again at http://wolkendek.nl/wx/bug2.pl > > The new code *still* displays the problem I described. The space and > return keys are duplicated, the right arrow is not... (messages are > printed in the console window). > >>> The problem disappears when I remove the Wx::ActiveX code so it must >>> be something in there, right? >> >> no > > Explain, please... > > Regards, > Peter > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > wxperl-users mailing list > wxp...@li... > https://lists.sourceforge.net/lists/listinfo/wxperl-users |
From: DH <cra...@ya...> - 2004-03-24 00:11:35
|
> > The full code is again at http://wolkendek.nl/wx/bug2.pl ok, i see what you're talking about now. I checked out Wx-ActiveX-0.05 and for whatever reason, in wxactivex.cpp, gmpassos does a PostMessage I don't know why he added that, but that's where the extra event is coming from long wxActiveX::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { *snip* case WM_SYSKEYUP: PostMessage(m_oleObjectHWND, nMsg, wParam, lParam); *snip* __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html |
From: Simon F. <sf...@fl...> - 2004-03-24 11:58:03
Attachments:
wx_cropped_perl-minimal.diff
wx_cropped_c++-minimal.diff
|
Hello, I'm having a problem with Wx::Bitmap->GetSubBitmap on wxMSW. Bitmaps returned with GetSubBitmap aren't displaying properly. I'ev attached a small diff to minimal.pl that shows the problem. You need an image 'toobig.png' in the same directory as minimal.pl - It doesn't matter what the image is, as long as it's bigger than 32x32. This sub bitmap doesn't display at all, and if you do a $sub_bitmap->SaveFile('cropped.png', wxBITMAP_TYPE_PNG) you should see that image is broken. I've tested on wxMSW 2.4.1 with Wx 0.18 and also the 2.4.2-0.18 ppm from wxperl.sf.net. Both display the same behaviour. This works fine on wxGTK 2.4.2/Wx 0.18. It also works fine in C++ on windows (see attached diff to minimal.cpp). To futher confound the problem, I can get it working in perl on wxMSW if I convert the bitmap to a Wx::Image, then call GetSubImage(), and then convert it back to a Wx::Bitmap. I can use that as a workaround. But it's a bit ugly. Thanks for your help, Simon |
From: Mattia B. <mat...@li...> - 2004-04-10 20:50:45
|
On Wed, 24 Mar 2004 11:57:55 +0000 Simon Flack <sf...@fl...> wrote: Hello, > I'm having a problem with Wx::Bitmap->GetSubBitmap on wxMSW. Bitmaps returned > with GetSubBitmap aren't displaying properly. > > I'ev attached a small diff to minimal.pl that shows the problem. You need an > image 'toobig.png' in the same directory as minimal.pl - It doesn't matter > what the image is, as long as it's bigger than 32x32. This sub bitmap doesn't > display at all, and if you do a $sub_bitmap->SaveFile('cropped.png', > wxBITMAP_TYPE_PNG) you should see that image is broken. > > I've tested on wxMSW 2.4.1 with Wx 0.18 and also the 2.4.2-0.18 ppm from > wxperl.sf.net. Both display the same behaviour. This works fine on wxGTK > 2.4.2/Wx 0.18. It also works fine in C++ on windows (see attached diff to > minimal.cpp). Thanks for the sample. Works for me (wxMSW, CVS head). It appears to be a wxWidgets problem: debugging the code with 2.4 from CVS, this assert: wxBitmap ret( rect.width, rect.height, GetDepth() ); wxASSERT_MSG( ret.Ok(), wxT("GetSubBitmap error") ); fails, which means that wxWidgets failed to create the 32 x 32 bitmap. I fon't know why, though. Regards Mattia |
From: Simon F. <sf...@fl...> - 2004-04-13 11:04:10
|
On Sat, 10 Apr 2004 22:51:10 +0200 (ora legale Europa occidentale), Mattia Barbon wrote >On Wed, 24 Mar 2004 11:57:55 +0000 Simon Flack <sf...@fl...> wrote: > > Hello, > >> I'm having a problem with Wx::Bitmap->GetSubBitmap on wxMSW. Bitmaps >> returned with GetSubBitmap aren't displaying properly. >> >> I'ev attached a small diff to minimal.pl that shows the problem. You >> need an image 'toobig.png' in the same directory as minimal.pl - It [snip] > Thanks for the sample. Works for me (wxMSW, CVS head). It appears >to be a wxWidgets problem: debugging the code with 2.4 from CVS, >this assert: > > wxBitmap ret( rect.width, rect.height, GetDepth() ); > wxASSERT_MSG( ret.Ok(), wxT("GetSubBitmap error") ); > >fails, which means that wxWidgets failed to create the 32 x 32 >bitmap. I fon't know why, though. Thanks for testing that for me. I can work around it by creating a Wx::Image from the bitmap, calling GetSubImage() on that, and then convert the image back to a bitmap. I've ported python's wx.throbber - I'll post a link to d/l it this evening, and if all comments are good (or I get no negative comments) I'll upload to CPAN after Wx 0.19 goes public. Thx Simon |
From: Simon F. <sf...@fl...> - 2004-04-13 20:22:25
|
Hi, I've ported Python's wx.throbber library to perl. It's currently available here: http://www.simonflack.com/tmp/Wx-Perl-Throbber-0.03.tar.gz Documentation: http://www.simonflack.com/tmp/wxPerlThrobber.html The original version wasa direct port of the wxPython library, but I've revised and extended the API in this version, giving you more control over your throbber. .oO(I'm beginning to wish it had a different name) I've included a demo app with the distribution that should give you a feel ov most of the functionality. I'll release this to CPAN after Wx 0.19 is released, since it really needs Wx: :NewEventType(). But this version works on earlier releases of Wx - just ignore the warning from Makefile.PL for now. I also need to re-read the wxWindows & GPL licenses to check whether there are any restrictions on the license I can use (given that this is a derivative of a library released under wxWindows/GPL) Comments, criticisms, suggestions etc are all welcome. Simon |
From: Graciliano M. P. <gmp...@te...> - 2004-03-24 13:05:35
|
Thanks to report that. Have you tested to compile it without this PostMessage line? If we can remove that and have all the demos working I can release a new version of Wx::ActiveX. Note that I haven't wrote all the sources for wxactivex.cpp, since they come from the old sources of wxIE, from Justin Bradford and Lindsay Mathieson. Regards, Graciliano M. P. ----- Original Message ----- From: "DH" <cra...@ya...> To: "Peter van der Landen" <la...@fr...>; <wxp...@li...> Cc: <gm...@vi...> Sent: Tuesday, March 23, 2004 9:11 PM Subject: [Spam] Re: [wxperl-users] Bug in Wx::ActiveX affecting accelerator events? > > > > The full code is again at http://wolkendek.nl/wx/bug2.pl > > ok, i see what you're talking about now. > I checked out Wx-ActiveX-0.05 > and for whatever reason, in wxactivex.cpp, gmpassos does a PostMessage > I don't know why he added that, but that's where the extra event is coming from > > long wxActiveX::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) > { > *snip* > case WM_SYSKEYUP: > PostMessage(m_oleObjectHWND, nMsg, wParam, lParam); > > *snip* > > > __________________________________ > Do you Yahoo!? > Yahoo! Finance Tax Center - File online. File on time. > http://taxes.yahoo.com/filing.html > > Esta mensagem foi verificada pelo E-mail Protegido Terra. > Scan engine: VirusScan / Atualizado em 22/03/2004 / Versão: 1.5.2 > Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/ > > E-mail classificado pelo Identificador de Spam Inteligente Terra. > Para alterar a categoria classificada, visite > http://www.terra.com.br/centralunificada/emailprotegido/imail/imail.cgi?+_u= gmpowers&_l=1080087113.959948.3888.turvo.terra.com.br > |
From: DH <cra...@ya...> - 2004-03-24 22:52:19
|
--- "Graciliano M. P." <gmp...@te...> wrote: > Thanks to report that. > > Have you tested to compile it without this PostMessage line? If we can > remove that and have all the demos working I can release a new version of > Wx::ActiveX. No. Now I have and only wxAcrobat doesn't work. There is a repainting bug without the PostMessage, but that's not how it should be solved. The Acrobat window should be watching for EVT_ERASE_BACKGROUND events and repainting refreshing itself accordingly. > > Note that I haven't wrote all the sources for wxactivex.cpp, since they come > from the old sources of wxIE, from Justin Bradford and Lindsay Mathieson. maybe you should contact them to see why they used it :) __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html |
From: Mark W. <ma...@ne...> - 2004-03-25 07:33:41
|
I have been using the wxAcrobat control and have experienced problems with repainting. Maybe this was added to try and fix the repainting problem, which does not seem to have fixed the problem. Has anyone else used this control, encountered the problem, and found a way round the control not repainting properly. Not just repainting, it is also the initial painting. Regards Mark > -----Original Message----- > From: wxp...@li... > [mailto:wxp...@li...] On Behalf Of DH > Sent: 25 March 2004 12:52 AM > To: Graciliano M. P. > Cc: List wxPerl > Subject: Re: [Spam] Re: [wxperl-users] Bug in Wx::ActiveX > affecting accelerator events? > > --- "Graciliano M. P." <gmp...@te...> wrote: > > Thanks to report that. > > > > Have you tested to compile it without this PostMessage > line? If we can > > remove that and have all the demos working I can release a new > > version of Wx::ActiveX. > > No. Now I have and only wxAcrobat doesn't work. > There is a repainting bug without the PostMessage, but that's > not how it should be solved. > The Acrobat window should be watching for > EVT_ERASE_BACKGROUND > events and repainting refreshing itself accordingly. > > > > > Note that I haven't wrote all the sources for wxactivex.cpp, since > > they come from the old sources of wxIE, from Justin > Bradford and Lindsay Mathieson. > > maybe you should contact them to see why they used it :) > > > __________________________________ > Do you Yahoo!? > Yahoo! Finance Tax Center - File online. File on time. > http://taxes.yahoo.com/filing.html > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials Free > Linux tutorial presented by Daniel Robbins, President and CEO > of GenToo technologies. Learn everything from fundamentals to > system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > wxperl-users mailing list > wxp...@li... > https://lists.sourceforge.net/lists/listinfo/wxperl-users > |
From: Jouke V. <jo...@pv...> - 2004-04-14 07:02:46
|
Hi Simon, Simon Flack wrote: > Comments, criticisms, suggestions etc are all welcome. Very nice work indeed! I think I'll be trying it soon! -- Jouke Visser +--------------------------------------------------------------------+ | Speaking at the 2004 O'Reilly | http://www.pvoice.org | | Open Source Convention about pVoice | http://jouke.pvoice.org | | http://conferences.oreilly.com/oscon | jo...@pv... | +--------------------------------------------------------------------+ |
From: Scott L. <lan...@wh...> - 2004-04-14 09:39:25
|
On Wed, 14 Apr 2004, Jouke Visser wrote: > Simon Flack wrote: > > Comments, criticisms, suggestions etc are all welcome. > Very nice work indeed! I think I'll be trying it soon! Let us know if his Throbber satisfies your needs. P.S. Simon, why did you wish it had a different name? :) |