You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
|
Feb
(7) |
Mar
(5) |
Apr
(4) |
May
(15) |
Jun
(10) |
Jul
(4) |
Aug
(12) |
Sep
(39) |
Oct
(22) |
Nov
(46) |
Dec
(65) |
2002 |
Jan
(19) |
Feb
(27) |
Mar
(50) |
Apr
(73) |
May
(85) |
Jun
(52) |
Jul
(49) |
Aug
(95) |
Sep
(152) |
Oct
(81) |
Nov
(42) |
Dec
(62) |
2003 |
Jan
(45) |
Feb
(47) |
Mar
(101) |
Apr
(110) |
May
(53) |
Jun
(72) |
Jul
(125) |
Aug
(77) |
Sep
(87) |
Oct
(69) |
Nov
(55) |
Dec
(71) |
2004 |
Jan
(127) |
Feb
(68) |
Mar
(93) |
Apr
(102) |
May
(64) |
Jun
(92) |
Jul
(40) |
Aug
(113) |
Sep
(44) |
Oct
(61) |
Nov
(44) |
Dec
(100) |
2005 |
Jan
(57) |
Feb
(51) |
Mar
(101) |
Apr
(73) |
May
(45) |
Jun
(97) |
Jul
(92) |
Aug
(94) |
Sep
(46) |
Oct
(83) |
Nov
(82) |
Dec
(68) |
2006 |
Jan
(92) |
Feb
(116) |
Mar
(84) |
Apr
(66) |
May
(40) |
Jun
(57) |
Jul
(89) |
Aug
(82) |
Sep
(58) |
Oct
(94) |
Nov
(104) |
Dec
(70) |
2007 |
Jan
(86) |
Feb
(108) |
Mar
(193) |
Apr
(84) |
May
(71) |
Jun
(54) |
Jul
(17) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: roger <rug...@ya...> - 2001-10-15 18:49:24
|
Hi, I try to maximize a window with : sub OnInit { my( $this ) = shift; my( $frame ) = MyFrame->new( "Minimal wxPerl app", wxDefaultPosition, [450, 350] ); $frame->Show( 1 ); $this->SetTopWindow( $frame ); $frame->Maximize(1); return 1; } I copied the code from one example... but dont' work I want open the application maximized. Any suggestion?? Thanks Ruggero. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Mattia B. <mb...@ds...> - 2001-10-11 19:29:00
|
> > >Any ideas why? > > > > I don't have a wxPerl at hand here, but if you draw from 'new' > > then the first paint event you get will destroy everything you painted. > > If this is just a test case, and you do the drawing from an > > event handler ( say in response to a menu/toolbar event ) then > > I need to check at home. > Eventually I indeed want to draw from an event handler, but for this > test, I'm trying to create a ScrollWindow in a frame and try to paint on > it from the constructor of the frame. The code gets executed without any > warnings or errors, but the stuff just isn't displayed. Not even after a > Refresh method or a resize ... Yes, I understood, but my explanation was not clear at all: you are doing: * create the window * draw in the window * show the window ( causes a wxEraseEvent & wxPaintEvent ) * maximize the window ( another wxEraseEvent & wxPaintEvent couple ) So whatever you draw is subsequently erased... If you do: * create the window * show the window ( causes a wxEraseEvent & wxPaintEvent ) * draw in the window Then the picture is drawn and not erased ( until you resize/refresh the window ). Hope it's clearer now Regards Mattia |
From: Jouke V. <jo...@pv...> - 2001-10-11 07:12:12
|
> >Any ideas why? > > I don't have a wxPerl at hand here, but if you draw from 'new' > then the first paint event you get will destroy everything you painted. > If this is just a test case, and you do the drawing from an > event handler ( say in response to a menu/toolbar event ) then > I need to check at home. Eventually I indeed want to draw from an event handler, but for this test, I'm trying to create a ScrollWindow in a frame and try to paint on it from the constructor of the frame. The code gets executed without any warnings or errors, but the stuff just isn't displayed. Not even after a Refresh method or a resize ... > >#!/usr/bin/perl <snip code> > >package main; > > > >my $app = MyApp->new(); > >$app->MainLoop(); -- *-----------------------------------------------* |Jouke Visser |jo...@pv... | |Perl GUI Geek |http://www.pvoice.org | *-----------------------------------------------* PS: Notice new mailaddress!! |
From: Mattia B. <mb...@ds...> - 2001-10-10 14:17:29
|
On Wed, 10 Oct 2001, Jouke Visser wrote: >Hi, > >I can't find a successful way to draw on the screen using some kind of >DC other than in an OnPaint or OnDraw method. I want to draw to a piece >of the screen from outside of those methods. The following examplecode >executes without errors or warnings, but shows an empty window: > >Any ideas why? I don't have a wxPerl at hand here, but if you draw from 'new' then the first paint event you get will destroy everything you painted. If this is just a test case, and you do the drawing from an event handler ( say in response to a menu/toolbar event ) then I need to check at home. Regards Mattia >#!/usr/bin/perl >use strict; >use Wx; > >package MyApp; >use base qw(Wx::App); > >sub OnInit { > my $this = shift; > my $frame = MyFrame->new( undef, 'Blah', [50,50], [420, 300] ); > > $frame->Show(1); > $this->SetTopWindow( $frame ); > $frame->Maximize(1); > > return 1; >} > >package MyFrame; >use base qw(Wx::Frame); > >use Wx qw(wxWHITE wxBITMAP_TYPE_GIF wxDEFAULT wxNORMAL >wxFONTENCODING_ISO8859_1); > >sub new { > my $class = shift; > my $this = $class->SUPER::new( $_[0], -1, @_[1,2,3] ); > > Wx::InitAllImageHandlers(); > > # create a scrolledwindow (canvas) > $this->{PANEL} = Wx::ScrolledWindow->new($this, -1); > $this->{PANEL}->SetBackgroundColour( wxWHITE ); > $this->{PANEL}->Show(1); > > # Initialize the DC > my $dc = Wx::ClientDC->new($this->{PANEL}); > $this->{PANEL}->PrepareDC($dc); > > # create bitmap > my $bmp = >Wx::Bitmap->new("h:/pABC/SOURCES/Plaatjes-syntheseprogr/SOK.gif", >wxBITMAP_TYPE_GIF); > my $image = Wx::Image->new($bmp); > $image->Rescale(200, 200); > $bmp = $image->ConvertToBitmap(); > $dc->DrawBitmap($bmp, 250, 0, 0); > > # draw some text > my $font = Wx::Font->new(100, wxDEFAULT, wxNORMAL, wxNORMAL, 0, "", >wxFONTENCODING_ISO8859_1); > $dc->SetFont($font); > $dc->DrawText("S O _", 250,225); > > return $this; >} > >package main; > >my $app = MyApp->new(); >$app->MainLoop(); > > > |
From: Jouke V. <jo...@pv...> - 2001-10-10 13:19:27
|
Hi, I can't find a successful way to draw on the screen using some kind of DC other than in an OnPaint or OnDraw method. I want to draw to a piece of the screen from outside of those methods. The following examplecode executes without errors or warnings, but shows an empty window: Any ideas why? #!/usr/bin/perl use strict; use Wx; package MyApp; use base qw(Wx::App); sub OnInit { my $this = shift; my $frame = MyFrame->new( undef, 'Blah', [50,50], [420, 300] ); $frame->Show(1); $this->SetTopWindow( $frame ); $frame->Maximize(1); return 1; } package MyFrame; use base qw(Wx::Frame); use Wx qw(wxWHITE wxBITMAP_TYPE_GIF wxDEFAULT wxNORMAL wxFONTENCODING_ISO8859_1); sub new { my $class = shift; my $this = $class->SUPER::new( $_[0], -1, @_[1,2,3] ); Wx::InitAllImageHandlers(); # create a scrolledwindow (canvas) $this->{PANEL} = Wx::ScrolledWindow->new($this, -1); $this->{PANEL}->SetBackgroundColour( wxWHITE ); $this->{PANEL}->Show(1); # Initialize the DC my $dc = Wx::ClientDC->new($this->{PANEL}); $this->{PANEL}->PrepareDC($dc); # create bitmap my $bmp = Wx::Bitmap->new("h:/pABC/SOURCES/Plaatjes-syntheseprogr/SOK.gif", wxBITMAP_TYPE_GIF); my $image = Wx::Image->new($bmp); $image->Rescale(200, 200); $bmp = $image->ConvertToBitmap(); $dc->DrawBitmap($bmp, 250, 0, 0); # draw some text my $font = Wx::Font->new(100, wxDEFAULT, wxNORMAL, wxNORMAL, 0, "", wxFONTENCODING_ISO8859_1); $dc->SetFont($font); $dc->DrawText("S O _", 250,225); return $this; } package main; my $app = MyApp->new(); $app->MainLoop(); -- *-----------------------------------------------* |Jouke Visser |jo...@pv... | |Perl GUI Geek |http://www.pvoice.org | *-----------------------------------------------* PS: Notice new mailaddress!! |
From: Mattia B. <mb...@ds...> - 2001-10-09 21:14:15
|
> When I run this script, it gives me some weird errors, and what's even weirder is that it says the errors are on lines 147 & 148, but the script itself is only 105 lines. Below is the most important parts of the script, but I'm also attaching the whole thing. <snip> > And the error: > Argument "bitmaps/new.bmp" isn't numeric in addition (+) at C:/Matt/perl/site/lib/Wx.pm line 147. > Use of uninitialized value in subroutine entry at C:/Matt/perl/site/lib/Wx.pm line 148. > > * It does that error for each of the tools on the toolbar. Use $toolbar->AddToolShort($ID_TB_NEW, Bitmap("new"), "New file", "Create a new configuration file"); as a temporary workaround. Regards Mattia |
From: Mattia B. <mb...@ds...> - 2001-10-09 21:05:45
|
> When I run this script, it gives me some weird errors, and what's even weirder is that it says the errors are on lines 147 & 148, but the script itself is only 105 lines. Below is the most important parts of the script, but I'm also attaching the whole thing. <snip> > And the error: > Argument "bitmaps/new.bmp" isn't numeric in addition (+) at C:/Matt/perl/site/lib/Wx.pm line 147. > Use of uninitialized value in subroutine entry at C:/Matt/perl/site/lib/Wx.pm line 148. > > * It does that error for each of the tools on the toolbar. Already fixed in CVS. Thanks for reporting! Regards Mattia |
From: Matt F. <ma...@iw...> - 2001-10-09 01:00:21
|
When I run this script, it gives me some weird errors, and what's even weirder is that it says the errors are on lines 147 & 148, but the script itself is only 105 lines. Below is the most important parts of the script, but I'm also attaching the whole thing. my ($ID_TOOLBAR, $ID_TB_NEW, $ID_TB_OPEN, $ID_TB_SAVE) = (7..11); my $toolbar = $self->CreateToolBar(wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT, $ID_TOOLBAR); $toolbar->AddTool($ID_TB_NEW, Bitmap("new"), "New file", "Create a new configuration file"); $toolbar->AddTool($ID_TB_OPEN, Bitmap("open"), "Open file", "Open an existing configuration file"); $toolbar->AddTool($ID_TB_SAVE, Bitmap("save"), "Save file", "Save the current configuration file"); $toolbar->Realize(); And the error: Argument "bitmaps/new.bmp" isn't numeric in addition (+) at C:/Matt/perl/site/lib/Wx.pm line 147. Use of uninitialized value in subroutine entry at C:/Matt/perl/site/lib/Wx.pm line 148. * It does that error for each of the tools on the toolbar. Thanks in advance, Matt Felsen _____________________________________________________________ |
From: Matt F. <ma...@iw...> - 2001-10-09 00:59:54
|
When I run this script, it gives me some weird errors, and what's even weirder is that it says the errors are on lines 147 & 148, but the script itself is only 105 lines. Below is the most important parts of the script, but I'm also attaching the whole thing. my ($ID_TOOLBAR, $ID_TB_NEW, $ID_TB_OPEN, $ID_TB_SAVE) = (7..11); my $toolbar = $self->CreateToolBar(wxTB_HORIZONTAL | wxNO_BORDER | wxTB_FLAT, $ID_TOOLBAR); $toolbar->AddTool($ID_TB_NEW, Bitmap("new"), "New file", "Create a new configuration file"); $toolbar->AddTool($ID_TB_OPEN, Bitmap("open"), "Open file", "Open an existing configuration file"); $toolbar->AddTool($ID_TB_SAVE, Bitmap("save"), "Save file", "Save the current configuration file"); $toolbar->Realize(); And the error: Argument "bitmaps/new.bmp" isn't numeric in addition (+) at C:/Matt/perl/site/lib/Wx.pm line 147. Use of uninitialized value in subroutine entry at C:/Matt/perl/site/lib/Wx.pm line 148. * It does that error for each of the tools on the toolbar. Thanks in advance, Matt Felsen _____________________________________________________________ |
From: Mattia B. <mb...@ds...> - 2001-10-08 20:22:10
|
Forgot to reply-all ------- Forwarded message follows ------- From: Mattia Barbon <mb...@ds...> To: Christian Jaeger <chr...@sl...> Subject: Re: [wxperl-users] wxPerl-MacOSX compile Send reply to: mb...@ds... Date sent: Mon, 8 Oct 2001 02:37:33 +0200 > Hi Mattia and all > > We've done a first attempt compiling wxPerl on MacOSX. Great! > wxWindows (from CVS from Sept. 14th) installed fine. The wxWindows > examples work. > > Then fetched wxPerl (the CVS snapshot from some days ago, $Wx::VERSION > == 0.08): > > - There's no g++ on MacOSX, only c++ (it's gcc all the same :-/). So > changed build/Any_wx_config.pm. Will change in CVS. > - It didn't find wx/mac/*.h and wx/chkconfig.h, for some reason they did > not install - so did a manual cp from the wxWindows source to > /usr/local/include > - Now there are still warnings on `perl Makefile.PL': > > [localhost:/wxWin/wxPerl] philipp% perl Makefile.PL > Checking if your kit is complete... > Warning: the following files are missing in your kit: > demo/data/locale/en/wxperl_demo.mo > demo/data/locale/en/wxperl_demo.po.poedit > demo/data/locale/fr/wxperl_demo.mo > demo/data/locale/fr/wxperl_demo.po.poedit > demo/data/locale/it/wxperl_demo.mo > demo/data/locale/it/wxperl_demo.po.poedit My fault; they should not be there > Please inform the author. > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'Carbon' > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'System' > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'Carbon' > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'System' > Writing Makefile for Wx::MDI > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'Carbon' > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'System' > Writing Makefile for Wx::DND > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'Carbon' > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'System' > Writing Makefile for Wx::Html > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'Carbon' > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'System' > Writing Makefile for Wx::Help > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'Carbon' > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'System' > Writing Makefile for Wx::FS > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'Carbon' > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'System' > Writing Makefile for Wx::Print > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'Carbon' > Unrecognized argument in LIBS ignored: '-framework' > Unrecognized argument in LIBS ignored: 'System' This might or might not be harmless; they seem to be linker flags; if a plain perl Makefile.PL fails to link, using perl Makefile.PL EXTRA_LIBS="-framework Carbon -framework System" might help > Note (probably harmless): No library found for -lwxxrc go in 'directory-where-you-built-wx'/contrib/src/xrc and do make && make install > Writing Makefile for Wx::XRC > Writing Makefile for Wx > > [localhost:/wxWin/wxPerl] philipp% make > ... > ... > /usr/bin/perl -I/System/Library/Perl/darwin -I/System/Library/Perl > /System/Library/Perl/ExtUtils/xsubpp -C++ -noprototypes -typemap > /System/Library/Perl/ExtUtils/typemap -typemap ../../typemap -typemap > typemap MDI.xs > MDI.xsc && mv MDI.xsc MDI.c > c++ -c -I../.. -I/usr/local/include -I/usr/local/lib/wx/include -I. > -O3 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" > -I/System/Library/Perl/darwin/CORE -DWXPL_EXT -D__USE_WXCONFIG__ > -D__WXMAC__ -D__UNIX__ -D__DARWIN__ -D__POWERPC__ -DTARGET_CARBON MDI.c > In file included from MDI.xs:15: > /usr/local/include/wx/defs.h:359: declaration does not declare anything > MDI.c: In function `void XS_Wx__MDIParentFrame_GetWindowMenu(CV *)': > MDI.c:242: no matching function for call to > `wxMDIParentFrame::GetWindowMenu ()' > MDI.c: In function `void XS_Wx__MDIParentFrame_SetWindowMenu(CV *)': > MDI.c:263: no matching function for call to > `wxMDIParentFrame::SetWindowMenu (Wx_Menu *&)' > make[1]: *** [MDI.o] Error 1 > make: *** [subdirs] Error 2 > > How to go on? The last error is some unimplemented wxWindows' function. Just issue a make -k >make.log 2>&1 and send the resultimg make.log privately to me ( no need to clutter the list ). If you know what you are doing, you might add #if !defined(__WXMAC__) Wx_Menu* Wx_MDIParentFrame::GetWindowMenu() #endif ( in ext/mdi/XS/MDIParentFrame.xs ) and any other missing function Otherwise I'll do it once I have the log Thanks for your work! Mattia ------- End of forwarded message ------- |
From: Christian J. <chr...@sl...> - 2001-10-07 22:00:43
|
Hi Mattia and all We've done a first attempt compiling wxPerl on MacOSX. wxWindows (from CVS from Sept. 14th) installed fine. The wxWindows examples work. Then fetched wxPerl (the CVS snapshot from some days ago, $Wx::VERSION == 0.08): - There's no g++ on MacOSX, only c++ (it's gcc all the same :-/). So changed build/Any_wx_config.pm. - It didn't find wx/mac/*.h and wx/chkconfig.h, for some reason they did not install - so did a manual cp from the wxWindows source to /usr/local/include - Now there are still warnings on `perl Makefile.PL': [localhost:/wxWin/wxPerl] philipp% perl Makefile.PL Checking if your kit is complete... Warning: the following files are missing in your kit: demo/data/locale/en/wxperl_demo.mo demo/data/locale/en/wxperl_demo.po.poedit demo/data/locale/fr/wxperl_demo.mo demo/data/locale/fr/wxperl_demo.po.poedit demo/data/locale/it/wxperl_demo.mo demo/data/locale/it/wxperl_demo.po.poedit Please inform the author. Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'Carbon' Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'System' Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'Carbon' Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'System' Writing Makefile for Wx::MDI Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'Carbon' Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'System' Writing Makefile for Wx::DND Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'Carbon' Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'System' Writing Makefile for Wx::Html Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'Carbon' Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'System' Writing Makefile for Wx::Help Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'Carbon' Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'System' Writing Makefile for Wx::FS Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'Carbon' Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'System' Writing Makefile for Wx::Print Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'Carbon' Unrecognized argument in LIBS ignored: '-framework' Unrecognized argument in LIBS ignored: 'System' Note (probably harmless): No library found for -lwxxrc Writing Makefile for Wx::XRC Writing Makefile for Wx [localhost:/wxWin/wxPerl] philipp% make ... ... /usr/bin/perl -I/System/Library/Perl/darwin -I/System/Library/Perl /System/Library/Perl/ExtUtils/xsubpp -C++ -noprototypes -typemap /System/Library/Perl/ExtUtils/typemap -typemap ../../typemap -typemap typemap MDI.xs > MDI.xsc && mv MDI.xsc MDI.c c++ -c -I../.. -I/usr/local/include -I/usr/local/lib/wx/include -I. -O3 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -I/System/Library/Perl/darwin/CORE -DWXPL_EXT -D__USE_WXCONFIG__ -D__WXMAC__ -D__UNIX__ -D__DARWIN__ -D__POWERPC__ -DTARGET_CARBON MDI.c In file included from MDI.xs:15: /usr/local/include/wx/defs.h:359: declaration does not declare anything MDI.c: In function `void XS_Wx__MDIParentFrame_GetWindowMenu(CV *)': MDI.c:242: no matching function for call to `wxMDIParentFrame::GetWindowMenu ()' MDI.c: In function `void XS_Wx__MDIParentFrame_SetWindowMenu(CV *)': MDI.c:263: no matching function for call to `wxMDIParentFrame::SetWindowMenu (Wx_Menu *&)' make[1]: *** [MDI.o] Error 1 make: *** [subdirs] Error 2 How to go on? Christian. -- Christian Jaeger Programmer & System Engineer +41 1 430 45 26 ETHLife CMS Project - warehouse.ch/ethlife/www - www.ethlife.ethz.ch |
From: Mattia B. <mb...@ds...> - 2001-10-03 20:18:22
|
> The recent wxPerl articles on www.perl.com left me curious, so I decided to have > a closer look. The result is the code below a simple Login dialog (two text > entry fields, two text labels & two buttons) that I cobbled together from > samples in the mailinglist and sourceforge's samples archive.. > > Writing the code proved fairly easy, despite a nagging feeling that I don't > realy understand what's going on... but I ended up with two problems I can't > seem to solve: > > 1.I can't seem to find a sample for a (blind) textentry, > that doesn't show the text typed, but displays '*' for > each character typed. use the wxTE_PASSWORD in the Wx::TextCtrl constructor use Wx qw(wxTE_PASSWORD); # ... # ... Wx::TextCtrl->new( $self->{-panel} # Parent window ,$self->nextID() # Control id ,$default # default entry ,$coordAnchor # position X, Y ,$coordSize # size X, ,wxTE_PASSWORD ); > 2. Also, changing $main::DEBUG to 1 results in an error message > "Use of uninitialized value in subroutine entry at > D:\Projekte\Learning\Perl\wx\wxLogin.pl line 141." > that I don't understand. > The error occurs on the "$app->MainLoop();" line, btw. Because you are supposed to return an integer from OnExit, and since you return nothing ( = undef ) you get the warning when wxPerl tries to use the value. The return value should be the exit code of the program ( like when you do 'exit 1' ). But this semantic is not really useful in wxPerl ( in wxWindows it is ), so I might just remove it. For now just add a 'return 0' to OnExit. Regards Mattia |
From: Alexander F. G. <per...@bl...> - 2001-10-03 16:04:49
|
The recent wxPerl articles on www.perl.com left me curious, so I decided = to have a closer look. The result is the code below a simple Login dialog (two = text entry fields, two text labels & two buttons) that I cobbled together = from samples in the mailinglist and sourceforge's samples archive..=20 Writing the code proved fairly easy, despite a nagging feeling that I = don't realy understand what's going on... but I ended up with two problems I = can't seem to solve: 1.I can't seem to find a sample for a (blind) textentry,=20 that doesn't show the text typed, but displays '*' for=20 each character typed. 2. Also, changing $main::DEBUG to 1 results in an error message=20 "Use of uninitialized value in subroutine entry at D:\Projekte\Learning\Perl\wx\wxLogin.pl line 141."=20 that I don't understand. The error occurs on the "$app->MainLoop();" line, btw. As you might suspect, I'm using ActivePerl under Windows 2000.=20 wxPerl seems to be version 0.07 -------------- #!/usr/local/bin/perl -w # Pragmas use strict; # Modules use Wx; #########################################################################= ###### # Declare my own Frame-Class based on Wx::Frame #########################################################################= ###### package MyFrame; use base qw(Wx::Frame); #------------------------------------------------------------------------= ------ use Wx::Event qw/EVT_BUTTON /; #------------------------------------------------------------------------= ------ # Build the dialog sub new { my $class =3D shift; my $self =3D $class->SUPER::new(@_); = #------------------------------------------------------------------------= -- # create panel for the dialog $self->{-panel} =3D Wx::Panel->new( $self, -1); = #------------------------------------------------------------------------= -- # two text entry fields with Labels in front of them $self->addTextCtrl( 'UserID' , [10,12],[80, 10], [160, -1] ); $self->addTextCtrl( 'Password', [10,32],[80, 30], [160, -1] ); = #------------------------------------------------------------------------= -- # two Buttons for OK and Cancel $self->addButton("OK" ,[10 ,60 ],\&OkButton); $self->addButton("Cancel",[160,60 ],\&CancelButton); return $self; } #------------------------------------------------------------------------= ------ # increment and return the ID counter for dialog elements sub nextID { my $self=3D shift; $self->{-ID}=3D0 unless defined $self->{-ID}; $self->{-ID} =3D $self->{-ID}+1; return $self->{-ID}; } #------------------------------------------------------------------------= ------ # return the current ID counter for dialog elements sub getID { my $self=3D shift; $self->{-ID}=3D0 unless defined $self->{-ID}; return $self->{-ID}; } #------------------------------------------------------------------------= ------ # Add a Button to the Dialog sub addButton { my ($self,$label,$coord,$action) =3D @_; Wx::Button->new( $self->{-panel} # Parent window ,$self->nextID() # Control id ,$label # Label ,$coord # position X, Y ); EVT_BUTTON($self, $self->getID, $action) if $action; return $self; } #------------------------------------------------------------------------= ------ # Add a text label followed by a text entry to the dialog sub addTextCtrl { my ( $self ,$label ,$coordLabel ,$coordAnchor ,$coordSize ,$default ) =3D @_; = #------------------------------------------------------------------------= --- # avoid undefined default values $default=3D'' unless defined $default; = #------------------------------------------------------------------------= --- # Add the Label Wx::StaticText->new( $self->{-panel} # Parent window ,$self->nextID() # Control id ,$label # Label ,$coordLabel # position X, Y ); = #------------------------------------------------------------------------= --- # Add the text control $self->{-textvar} ->{$label} =3D Wx::TextCtrl->new( $self->{-panel} # Parent = window ,$self->nextID() # Control id ,$default # default entry ,$coordAnchor # position X, Y ,$coordSize # size X, Y ); return $self; } #------------------------------------------------------------------------= ------ # handle the OK-Button event sub OkButton { my($self, $event) =3D @_; print "Button: OK\n" if ( $main::DEBUG);; = #------------------------------------------------------------------------= --- # execute the action routine in main if it is defined # pass along the login parameters.. main::Action( $self->{-textvar}->{'UserID'}->GetValue ,$self->{-textvar}->{'Password'}->GetValue ) if defined &main::Action; = #------------------------------------------------------------------------= --- # close the dialog $self->Destroy(); } #------------------------------------------------------------------------= ------ # handle the CancelButton event sub CancelButton { my($self, $event) =3D @_; print "Button: CANCEL\n" if ( $main::DEBUG);; = #------------------------------------------------------------------------= --- # close the dialog $self->Destroy(); } #########################################################################= ###### # Declare my own Application class derived from Wx::App #########################################################################= ###### package wxLogin; use base qw(Wx::App); #------------------------------------------------------------------------= ------ sub OnInit{ my $self =3D shift; my $frame =3D MyFrame->new( undef # Parent window ,-1 # Window id ,'wxLogin example' # Title ,[10,10] # position X, Y ,[250, 120] # size X, Y ); $self->SetTopWindow($frame); # Define the toplevel window $frame->Show(1); # Show the frame 1; } #------------------------------------------------------------------------= ------ sub OnExit { Wx::LogMessage( "Exiting wxLOGIN" ) if ( $main::DEBUG); } #########################################################################= ###### package main; my( $app ) =3D wxLogin->new(); $main::DEBUG=3D0; $app->MainLoop(); #------------------------------------------------------------------------= ------ # this is the stub action, should do the DB-login and Data output = routines...=20 # later .. sub Action { my($uid,$pwd)=3D@_;print "Action($uid,$pwd)!\n"; } |
From: Jouke V. <jo...@pv...> - 2001-10-01 07:26:08
|
Hi Christian, I asked the question who would try to pick this up on the MacPerl porters list, but no-one replied yet (and I didn't receive any of the messages on that list, so maybe something went wrong...). I'm glad you're thinking about this... > I have written to this (wxperl-users ) list on 14 Sept, and Mattia > Barbon replied to me (for some reason he didn't send a copy to the > list) that it should not be too hard to port it to MacOSX but that it > will take some work, and he hasn't a Mac so only can help with advice > (he didn't say something about MacOS8/9, but I think this would be a > bit harder because MacPerl is quite different from Unix perl, and the > latest stable MacPerl version is also 5.004!, so maybe that could be > a problem). My thoughts are the same. I don't even have a clue how MacPerl would work in the first place, since it omits a shell (I think...) :) > We need to write a Gui for the Macs, but haven't decided yet whether > to use Perl+wxPerl or Perl+Carbon or C++ (maybe Metrowerks > Powerplant). If we decide (within the next week or two) to use > wxPerl, we'll be glad to work together in some form. I've already got > an offer for some help from someone on the macosx-perl-list. I think it would be much preferrable to use wxPerl because you then would have a way to write GUI programs in Perl which are *really* multiplatform: Win32, Mac *and* Unix. Carbon would not be usable on other platforms. > I think the following has to be worked out: > (at least for me, maybe others have more experience i.e. with Perl on MacOSX) <snip> Sounds like a good way of handling it... > Jouke, have you got any reply from the MacPerl guys? Would you be > interested in the MacOSX version? I have had no reply at all. I talked with Pudge about it on IRC and wit blech too. The latter has already tried to make it work, but it turned out that wxMac needs CodeWarrior, and he hasn't got a copy of that. So that's where his attempt ended. I would *very, very* much like to see this happen. If I can help anywhere (can't see where, because I don't own a Mac, nor have I experience in C/C++ programming), please let me know, because I'd be happy to help where I can! -- *-----------------------------------------------* |Jouke Visser |jo...@pv... | |Perl GUI Geek |http://www.pvoice.org | *-----------------------------------------------* PS: Notice new mailaddress!! |
From: Christian J. <chr...@sl...> - 2001-09-30 21:09:44
|
Hello, I'm crossposting this reply to the macosx-perl mailing list because there is some interest, too. At 14:02 Uhr +0200 24.9.2001, Jouke Visser wrote: >I wondered if anyone yet tried to compile wxPerl on a Mac. If not, I'd >like to ask around a bit at the guys doing MacPerl because this would >*really* be the big pro for wxPerl compared to Tk. wxWindows itself is >ported to the Mac, so I think in theory it should be possible. I have written to this (wxperl-users ) list on 14 Sept, and Mattia Barbon replied to me (for some reason he didn't send a copy to the list) that it should not be too hard to port it to MacOSX but that it will take some work, and he hasn't a Mac so only can help with advice (he didn't say something about MacOS8/9, but I think this would be a bit harder because MacPerl is quite different from Unix perl, and the latest stable MacPerl version is also 5.004!, so maybe that could be a problem). We need to write a Gui for the Macs, but haven't decided yet whether to use Perl+wxPerl or Perl+Carbon or C++ (maybe Metrowerks Powerplant). If we decide (within the next week or two) to use wxPerl, we'll be glad to work together in some form. I've already got an offer for some help from someone on the macosx-perl-list. I think the following has to be worked out: (at least for me, maybe others have more experience i.e. with Perl on MacOSX) MacOSX: - get wxWindows to install and work. Mattia writes: wxWindows on MacOS X is still not as stable as the Windows/GTK ports, though it is progressing steadily, and the developers are generally very responsive WRT bugreports; on MacOS 9 it should be pretty stable though Also quoting Mattia, we should use the the wxWindows' developement branch ( 2.3.1 ), or the CVS head. (The guys maintaining the MacOSX version of wxWindows seem to be from switzerland, that may be some benefit for me.) - find out how to compile perl modules on MacOSX (GCC, Development tools CD?, ...) - try to compile wxperl - find out why it doesn't - figure out how wxWindows works and which bindings wxPerl provides, so how to solve some platform specific quirks (hopefully not?). Maybe talk with the wxWindows-MacOSX guys if necessary. MacOS8/9: - get wxWindows installed - get CodeWarrior (I have an old (~2y) version that's probably outdated) - find out how to write interfaces for MacPerl. AFAIK, this works somewhat differently than the usual xs approach (Chris Nandor aka Pudge has written some MacPerl modules, I'm sure looking at his materials will help. I've also seen him in #macperl on irc.) - do the necessary stuff to get wxPerl compiled. - maybe find out why it doesn't - same thing as above. (- find out how well MacPerl works as a background application.-> for our purpose) (I mainly have experience with Perl on Linux, and some C and C++ background. I used MacPerl before I converted to linux some years ago. I haven't used MacOSX much yet.) We (my project partners and I) primarily need the MacOSX version, so wxPerl-MacOS8/9 doesn't have a high priority for us. We would need the MacOSX version at the latest by the end of october (november 24th our app has to be ready). Jouke, have you got any reply from the MacPerl guys? Would you be interested in the MacOSX version? Christian. |
From: Mattia B. <mb...@ds...> - 2001-09-30 19:48:53
|
> I've tried calling these methods on a wxPanel which is a part of a > wxSplitterWindow (and also tried to call it on the SplitterWindow > itself) and both GetSize and GetClientSize return 20 on the GetWidth > method of the returned wxSize object. I can't reproduce it there ( using the splitter sample ). If you could send a minimal patch to the sample demonstrating the problem ( another program that demonstrates the problem is OK, too, as long as it is short ), I will have a look at it. Regards Mattia |
From: Mattia B. <mb...@ds...> - 2001-09-30 19:48:50
|
> I just found out that EVT_MOUSE_EVENTS is not exported (and in fact not > mentioned) by Wx::Event, while it does exist in the API reference (and > of course -otherwise I wouldn't have noticed- I wanted to use it > myself). Can you fix this Mattia? Fixed the Wx::Image error, and this one right now. Regards Mattia |
From: Jouke V. <jo...@pv...> - 2001-09-30 16:05:47
|
Hi, > Do you mean that calling Invoke will cause a wxMouseEvent to be sent > to the button? Yes, that's what I mean. > I din't do that mainly because this is not very useful, in general: > most of the time you can do: <snip> I know. That's the way I'm handling it now. But I actually want to really invoke the event itself. That way I don't need a different subroutine for everything. I already have a Tk application which I want to convert to Wx, which creates the callback dynamically. Those kinds of callbacks can only be invoked by virtually generating the event. > Before you ask: user-defined events are not yet implemented in > wxPerl. Well, that would be one way to solve my problem. Is there a specific reason why this isn't implemented yet, or is it just a matter of time? OK, hereby my official Feature Request: Could you implement user-defined events? -- *-----------------------------------------------* |Jouke Visser |jo...@pv... | |Perl GUI Geek |http://www.pvoice.org | *-----------------------------------------------* PS: Notice new mailaddress!! |
From: Mattia B. <mb...@ds...> - 2001-09-30 14:11:26
|
> Hi, > > I'm looking for a way to invoke a command manually. I mean to do this: > > # Define the eventhandler for the button > EVT_BUTTON($this, $this->{button0}, sub {print "gelukt!\n"}); > # Invoke it when someone clicks anywhere in the panel. This obviously > # does not work: > EVT_LEFT_DOWN ($this->{TOPPANEL}, sub {$this->{button0}->Invoke}); > > I'm looking for a way to make this "Invoke" method work. Do you mean that calling Invoke will cause a wxMouseEvent to be sent to the button? > I've looked into ProcessEvent, but that wants an event as parameter, and > I can't find a way to create a "Click Button Event" object. I din't do that mainly because this is not very useful, in general: most of the time you can do: sub Clicked { my( $x, $y ) = @_; } sub OnClick { # ... Clicked( $x, $y ); } sub OnLeftDown { # ... Clicked( $x, $y ); } And generally, unless you are creating a custom control with custom events ( think wxCalendarControl ), you don't want to directly send events to controls, because a control receiving a system event will do: * some system dependent processing * send the wxWindows' event while sending an event directly to the control will miss the system dependent processing; BTW, in the wxWindows' lists generally you are discouraged to directly send system events to controls ( user-defined events are OK ). Before you ask: user-defined events are not yet implemented in wxPerl. Another reason you can't currently create a wxMouseEvent ( or any other event ), is that, at the time, I _thought_ it broke ( or perhaps "would have broke"? but you get the idea ) memory management; I need to review that, perhaps. Regards Mattia |
From: Jouke V. <jo...@pv...> - 2001-09-30 13:18:57
|
Hi, I'm looking for a way to invoke a command manually. I mean to do this: # Define the eventhandler for the button EVT_BUTTON($this, $this->{button0}, sub {print "gelukt!\n"}); # Invoke it when someone clicks anywhere in the panel. This obviously # does not work: EVT_LEFT_DOWN ($this->{TOPPANEL}, sub {$this->{button0}->Invoke}); I'm looking for a way to make this "Invoke" method work. I've looked into ProcessEvent, but that wants an event as parameter, and I can't find a way to create a "Click Button Event" object. Any idea? -- *-----------------------------------------------* |Jouke Visser |jo...@pv... | |Perl GUI Geek |http://www.pvoice.org | *-----------------------------------------------* PS: Notice new mailaddress!! |
From: Jouke V. <jo...@pv...> - 2001-09-30 10:50:43
|
Hi, I just found out that EVT_MOUSE_EVENTS is not exported (and in fact not mentioned) by Wx::Event, while it does exist in the API reference (and of course -otherwise I wouldn't have noticed- I wanted to use it myself). Can you fix this Mattia? -- *-----------------------------------------------* |Jouke Visser |jo...@pv... | |Perl GUI Geek |http://www.pvoice.org | *-----------------------------------------------* PS: Notice new mailaddress!! |
From: Mattia B. <mb...@ds...> - 2001-09-28 20:06:16
|
> Hi, > > As you can see I'm quite busy programming Wx...and I've found another Good! I like testers! > strange thing: GetSize and GetClientSize return bogus values. > > I've tried calling these methods on a wxPanel which is a part of a > wxSplitterWindow (and also tried to call it on the SplitterWindow > itself) and both GetSize and GetClientSize return 20 on the GetWidth > method of the returned wxSize object. If they work in ( say ) a wxFrame, or any other window type, then it is a wxWindows' bug ( since the wxPerl implementation is common ), otherwise, well, you know who is to blame... > The frame which contains the SplitterWindow is maximized, so it should > return something around 1024 (the width of my screen). > > Any ideas? No one ATM; will investigate Regards Mattia |
From: Mattia B. <mb...@ds...> - 2001-09-28 20:01:50
|
> Hi, > > I'm trying to load a JPG file in a wxImage object, which fails in every > way. First I tried this code: > > Wx::InitAllImageHandlers(); > my $image = Wx::Image->new(); > $image->LoadFile("i.jpg", wxBITMAP_TYPE_JPEG); > > Which results in: > "Undefined subroutine &Wx::Image::LoadFileSType called at > C:/perl/site/lib/Wx/Image.pm line 44. Use ->LoadFileType, as a temporary solution. > After that I tried to do it with: > > Wx::InitAllImageHandlers(); > my $image = Wx::Image->new("i.jpg", wxBITMAP_TYPE_JPEG); > > Which results in a pagefault, with details: Weird > Any suggestions? > > I'm running Windows 98, using ActiveState Perl 5.6.0 and wxPerl 0.7 > (binary PPD distribution). Regards Mattia |
From: Mattia B. <mb...@ds...> - 2001-09-28 19:32:51
|
> > i dont have configure, i used the src pkg > > wxMSW-2.2.7.zip, i used cygwin, but it compiled > > with mingw prefab makefiles, i could try downloading > > the unix src pkg?, its just that i saw cygwin has been > > tested with the wxMSW*.zip pkg so that is the one > > i used.. > Hmm... yes, I am too used to CVS sources; you don't have configure... > mmmh... > Will experiment with that setup, and let you know ASAP :( it seems to require quite a lot of modifications. Could you please point me to the prebuilt binary you use ( if you use a prebuilt one, of course ) so I can test what people use? But I need to advise you that full out-of-the-box support for Cygwin needs to wait the next wxPerl release :( ( which is not far away, though ) Sorry Mattia |
From: Jouke V. <jo...@pv...> - 2001-09-28 12:47:25
|
Hi, As you can see I'm quite busy programming Wx...and I've found another strange thing: GetSize and GetClientSize return bogus values. I've tried calling these methods on a wxPanel which is a part of a wxSplitterWindow (and also tried to call it on the SplitterWindow itself) and both GetSize and GetClientSize return 20 on the GetWidth method of the returned wxSize object. The frame which contains the SplitterWindow is maximized, so it should return something around 1024 (the width of my screen). Any ideas? -- *-----------------------------------------------* |Jouke Visser |jo...@pv... | |Perl GUI Geek |http://www.pvoice.org | *-----------------------------------------------* PS: Notice new mailaddress!! |