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: Nick J. <sk...@er...> - 2002-09-01 21:29:04
|
I had the exact same problem. To fix it, just copy the "auto" directory containing the wxWindows/wxPerl .DLL files into the directory with your script in it. It worked fine for me then. If the --gui causes a "Bad command or filename" or the equivalent NT/Win2k error to appear, I have a fix for that too. In Perl's config files, one of the vars contains the location to Perl's binary. I think it might be PERL5BIN but I honestly can't remember. Anyway the problem is caused when this path includes UNIX-style forward slashes rather than the DOS/Windows style slashes. AFAIK this is because the PerlApp program runs another program which modifies the executable to be a GUI program. And command.com doesn't take kindly to UNIX-style slashes. Hope this works. It took me ages to figure this out, I don't know why PDK cannot include the required files automatically. Regards, Nick Johnston David Kaufman wrote: >Has anyone successfully converted a simple "hello world" wxPerl script >into an .exe using the Activestate PDK's PerlApp utility? > >i've been trying all day with no joy. the .exe failed silently until i >tried compiling it without the -gui option. after droppping the -gui, i >see this error on stderr (at run time, not compile time): > >Can't load 'auto/Wx/Wx.dll' for module Wx: load_file:One of the library >files ne >eded to run this application cannot be found at /PerlApp/DynaLoader.pm >line 212. > >but the "verbose" perlapp output (below) clearly shows that perlapp >found and included the Wx.dll: > >PerlApp 4.0.0 build 401 >Copyright (C) ActiveState Corp 2001-2002. All rights reserved. >Commercial license for David Kaufman <da...@gi...> > >+++ C:/Perl/lib/AutoLoader.pm >+++ C:/Perl/lib/Carp.pm >+++ C:/Perl/lib/Carp/Heavy.pm >+++ C:/Perl/lib/Config.pm >+++ DynaLoader.pm (internal) >+++ C:/Perl/lib/Errno.pm >+++ C:/Perl/lib/Exporter.pm >+++ C:/Perl/lib/Exporter/Heavy.pm >+++ C:/Perl/lib/File/Glob.pm >+++ C:/Perl/lib/Text/ParseWords.pm >+++ C:/Perl/lib/Tie/Handle.pm >+++ C:/Perl/site/lib/Wx.pm >+++ C:/Perl/site/lib/Wx/App.pm >+++ C:/Perl/site/lib/Wx/Bitmap.pm >+++ C:/Perl/site/lib/Wx/Brush.pm >+++ C:/Perl/site/lib/Wx/Caret.pm >+++ C:/Perl/site/lib/Wx/Colour.pm >+++ C:/Perl/site/lib/Wx/ComboBox.pm >+++ C:/Perl/site/lib/Wx/ControlWithItems.pm >+++ C:/Perl/site/lib/Wx/Cursor.pm >+++ C:/Perl/site/lib/Wx/DC.pm >+++ C:/Perl/site/lib/Wx/DND.pm >+++ C:/Perl/site/lib/Wx/DropSource.pm >+++ C:/Perl/site/lib/Wx/Event.pm >+++ C:/Perl/site/lib/Wx/FS.pm >+++ C:/Perl/site/lib/Wx/Grid.pm >+++ C:/Perl/site/lib/Wx/Help.pm >+++ C:/Perl/site/lib/Wx/Html.pm >+++ C:/Perl/site/lib/Wx/Icon.pm >+++ C:/Perl/site/lib/Wx/Image.pm >+++ C:/Perl/site/lib/Wx/ImageList.pm >+++ C:/Perl/site/lib/Wx/ListCtrl.pm >+++ C:/Perl/site/lib/Wx/Locale.pm >+++ C:/Perl/site/lib/Wx/MDI.pm >+++ C:/Perl/site/lib/Wx/Menu.pm >+++ C:/Perl/site/lib/Wx/Pen.pm >+++ C:/Perl/site/lib/Wx/Print.pm >+++ C:/Perl/site/lib/Wx/RadioBox.pm >+++ C:/Perl/site/lib/Wx/Rect.pm >+++ C:/Perl/site/lib/Wx/Region.pm >+++ C:/Perl/site/lib/Wx/STC.pm >+++ C:/Perl/site/lib/Wx/ScreenDC.pm >+++ C:/Perl/site/lib/Wx/Sizer.pm >+++ C:/Perl/site/lib/Wx/SplashScreen.pm >+++ C:/Perl/site/lib/Wx/StaticBitmap.pm >+++ C:/Perl/site/lib/Wx/Timer.pm >+++ C:/Perl/site/lib/Wx/ToolBar.pm >+++ C:/Perl/site/lib/Wx/TreeCtrl.pm >+++ C:/Perl/site/lib/Wx/Window.pm >+++ C:/Perl/site/lib/Wx/_Constants.pm >+++ C:/Perl/site/lib/Wx/_Exp.pm >+++ C:/Perl/site/lib/Wx/_Functions.pm >+++ C:/Perl/site/lib/Wx/_Inheritance.pm >+++ C:/Perl/site/lib/Wx/_Ovl.pm >+++ XSLoader.pm (internal) >+++ C:/Perl/lib/auto/DynaLoader/autosplit.ix >+++ C:/Perl/lib/auto/DynaLoader/dl_expandspec.al >+++ C:/Perl/lib/auto/DynaLoader/dl_find_symbol_anywhere.al >+++ C:/Perl/lib/auto/DynaLoader/dl_findfile.al >+++ C:/Perl/lib/auto/File/Glob/Glob.dll >+++ C:/Perl/lib/auto/File/Glob/autosplit.ix >+++ C:/Perl/site/lib/auto/Wx/Wx.dll >+++ C:/Perl/lib/base.pm >+++ C:/Perl/lib/fields.pm >+++ C:/Perl/lib/overload.pm >+++ C:/Perl/lib/strict.pm >+++ C:/Perl/lib/vars.pm >+++ C:/Perl/lib/warnings.pm >+++ C:/Perl/lib/warnings/register.pm > >Created 'test.exe' > > > >any help would be greatly appreaciated, > >-dave > > > > >------------------------------------------------------- >This sf.net email is sponsored by: OSDN - Tired of that same old >cell phone? Get a new here for FREE! >https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 >_______________________________________________ >wxperl-users mailing list >wxp...@li... >https://lists.sourceforge.net/lists/listinfo/wxperl-users > > > |
From: Mattia B. <mb...@ds...> - 2002-09-01 19:36:26
|
> > > hello > > > > > > i've a question concerning wxListItems. > > > Is it possible to get if the item has a bold font or not? > > > > > > greeting > > > Marco > > > > > > PS: please CC to me, i'm not in the list. thanks. > > > > > here is the basic idea: > > > > first get the item to wxListItem using: > > wxListCtrl::GetItem() > > im not sure but i think the wxLIST_MASK_TEXT > > mask should be set on the item > > > > then get the font of the item using: > > wxListItem::GetFont() > > > > then test the weight of the font using: > > wxFont::GetWeight() & wxBOLD > > > > and if that returns true, it is bold.. > > hey matthia, > this is exactly what i tried but what doesn't work, right? > if not, can you give an example what he's talking about? No, this does not work. There is AFAIK no way to ask the listctrl about its font/foreground/background. Regards Mattia |
From: Mattia B. <mb...@ds...> - 2002-09-01 19:36:26
|
> On Mon, 26 Aug 2002, Mattia Barbon wrote: > > This is maily for Marcus, but might interest others. > > There are two ways to workaround the bug you reported > > (I suddenly realized that I did not explain the workaround, sorry) > > 1 - Call directly ->InsertItemPrev (if the 2nd argument is a > > Wx::TreeItemId) or ->InsertItemBef (if the 2nd argument is an > > integer) > > 2 - do this, after the "use Wx;" > > undef *Wx::TreeCtrl::InsertItem; > > *Wx::TreeCtrl::InsertItem = sub { > > my $this = shift; > > > > if( ref( $_[1] ) && $_[1]->isa( 'Wx::TreeItemId' ) ) > > { return $this->InsertItemPrev( @_ ) } > > return $this->InsertItemBef( @_ ); > > } > > Hi, I don't remember seeing the oringal bug report, It was sent by private mail. > but I found a problem with InsertItem yesterday too > and I think the problem you give above must be the same one. Yes. > I had this patch, but perhaps it's irrelevant: Already applied to CVS. Thanks anyway. > --- TreeCtrl.pm.orig Thu May 2 16:28:28 2002 > +++ TreeCtrl.pm Thu Aug 29 18:33:36 2002 > @@ -29,7 +29,7 @@ > sub InsertItem { > my $this = shift; > > - if( isa( $_[1], 'Wx::TreeItemId' ) ) { return $this->InsertItemPrev( @_ ) } > + if( UNIVERSAL::isa( $_[1], 'Wx::TreeItemId' ) ) { return $this->InsertItemPrev( @_ ) } > return $this->InsertItemBef( @_ ); > } > > It simply calls `isa' in the correct (UNIVERSAL) package. > Also, I wished to not hack wxPerl (or allow > that possibly someone already installed an > earlier version), so I used this in my application: > > BEGIN { *Wx::TreeCtrl::isa = *UNIVERSAL::isa } > > It aliases the bogus `isa' in TreeCtrl package > to be in the UNIVERSAL package instead. :) Yhis looks like a much nicer workaround. Thanks! Mattia |
From: Mattia B. <mb...@ds...> - 2002-09-01 17:32:39
|
> I am using FlexGridSizer to layout a window and am having problems > getting a Panel to display when added to the Sizer with the Panel or > its row set not to grow. If I set it to grow then it displays. Also when > I remove the Panel and have the StaticTexts as children of $this then > the content displays. > > I want the Panel to be only as high as it needs to be to display its > content (message headers) leaving the rest of the window for the message > text. Which is why I don't want to set wxGROW or AddGrowableRow(). > > I am using a Panel so I can set the background and a border around a > collection of StaticTexts. > > The testcase below shows the problem. If I remove the wxGROW from line > 48 or comment out line 52 the the Panel doesn't display. > > Can someone tell me what I am doing wrong as I have tried everything I > can think of without success? > > I am using WxPerl 0.11 with ActivePerl Build 629. The attached modified program works: 1 - change the top FlexGridSizer to a BoxSizer (not necessary...) 2 - call $headsizer->Fit($headpanel) Explanation: When not using wxGROW/setting the second parameter to add to 0, sizers use the original size to get the width/height of the window; if you don't give an explicit size to the window, it defaults to [-1,-1] for a panel, hence it is not visible. Not related: you should use a red-only TextCtrl instead of a StaticText, otherwise the user can't do cut'n'paste Regards Mattia |
From: DH <cra...@ya...> - 2002-09-01 16:34:35
|
Hi. I've tried using Set(Fore|Back)groundColour with Wx::StaticLine, but it's not working. Wx::Static line is a Wx::Window, so it should happen. Refresh should help, but it doesn't. Neither does Clear. Calling Show('show') does paint it the default light gray, but only if you pass Show as string. Show(1) doesn't quite work. (this is also very bizzare ). The color gets set, cause if I set/get it, I can see that the values are correct, the static line just never gets painted, like it should. I believe this to be a bug ( it can't be because it's a "static" line, or can it ;)? My example is below, width peaks at 80 chars ;) =head1 NAME Wx::HexOrRgb - a Wx Dialog/App for converting color from/to hex/rgb =head1 SYNOPSIS perl -MWx::HexOrRgb -e Wx::HexOrRgb::App->new()->MainLoop() # or use Wx::HexOrRgb; Wx::HexOrRgb::App->new()->MainLoop(); # or even require Wx::HexOrRgb; system $^X, $INC{'Wx/HexOrRgb.pm'}; # or the oneliner version (quotes may vary ;) perl -mWx::HexOrRgb -e"system $^X, $INC{q{Wx/HexOrRgb.pm}};" # -m is equivalent to use Wx::HexOrRgb(); in case you was wondering =head1 DESCRIPTION Run it as a standalone app, or embed it easily into any wxPerl application, cause you never know when it might come in handy to convert between rgb and hex You probably got Wx::HexOrRgb from http://perlmonks.org/index.pl?node_id=194461 $Id: HexOrRgb.pm,v 0.05 2002/09/1 16:21:00 _ Exp $ =cut package Wx::HexOrRgb; use Wx qw( :everything ); use Wx::Event qw( EVT_RIGHT_DOWN EVT_SLIDER EVT_BUTTON ); use base qw( Wx::Frame ); use vars qw( $VERSION ); use strict; $VERSION = 0.05; sub new { my $class = shift; my $SIZE = [500,160]; my $self = $class->SUPER::new( undef, -1, "Wx::HexOrRgb - you know what it is ;)", [ 50, 50], $SIZE, wxSIMPLE_BORDER # as perl boo_radley's instruction | wxTHICK_FRAME # allows for resizability -- i don't want taht | wxSYSTEM_MENU | wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX | wxCLIP_CHILDREN, # removes flicker (windows only) ); $self->SetIcon( Wx::GetWxPerlIcon() ); my $p = Wx::Panel->new( $self, -1, [50,50], $SIZE, ); $self->GUI($p); ## and we construct the dialog EVT_BUTTON( $self, $self->ID('HEX2RGB_BUTTON'), \&OnHEX ); EVT_RIGHT_DOWN( $self, \&OnAbout ); EVT_RIGHT_DOWN( $p, \&OnAbout ); EVT_SLIDER( $self, $self->ID('R_SLIDER'), sub { my( $self, $event ) = @_; my $pos = $event->GetInt; $self->OnRGB($pos ); }); EVT_SLIDER( $self, $self->ID('G_SLIDER'), sub { my( $self, $event ) = @_; my $pos = $event->GetInt; $self->OnRGB(undef, $pos ); }); EVT_SLIDER( $self, $self->ID('B_SLIDER'), sub { my( $self, $event ) = @_; my $pos = $event->GetInt; $self->OnRGB(undef, undef, $pos ); }); for my $key( keys %{ $self->ID() } ) { EVT_RIGHT_DOWN( $self->FindWindow( $self->ID($key) ), \&OnAbout ); } my( $MainSizer ) = Wx::BoxSizer->new( Wx::wxHORIZONTAL ); $MainSizer->Add( $p, 1, wxGROW ); $self->SetSizer( $MainSizer ); $self->SetAutoLayout( 1 ); ## ;) $self->Layout(); ##force layout of the children anew $MainSizer->Fit( $self ); $MainSizer->SetSizeHints( $self ); #die Wx::GetColourFromUser( $self ); return $self; } #### THE EVENT HANDLERS sub OnRGB { my( $self, $r, $g, $b ) = @_; $r ||= $self->FindWindow( $self->ID('R_SLIDER') )->GetValue; $g ||= $self->FindWindow( $self->ID('G_SLIDER') )->GetValue; $b ||= $self->FindWindow( $self->ID('B_SLIDER') )->GetValue; my $rgb = $self->FindWindow( $self->ID('RGB_PANEL') ); $rgb->Refresh; # or Clear ;) $rgb->SetBackgroundColour( new Wx::Colour( $r, $g, $b ) ); $self->FindWindow( $self->ID('HEX_TEXT') )->SetValue( sprintf '#%02X%02X%02X', $r, $g, $b ); } sub OnHEX { my( $self, $evt ) = @_; $_ = $self->FindWindow( $self->ID('HEX_TEXT') )->GetValue; my( $r, $g, $b ) = m/\#?([a-z0-9]{2})([a-z0-9]{2})([a-z0-9]{2})/i; unless( $r and $g and $b ) { Wx::MessageBox( "Sorry mate, missing a hex value someplace. ($_) Need 6 you know.", "EEEEEEEEK! Now how'd that happen?!?!?", wxICON_ERROR | wxOK, $self, ); return(); }; for ( $r, $g, $b ) { $_ = hex $_; } $self->FindWindow( $self->ID('R_SLIDER') )->SetValue( $r ); $self->FindWindow( $self->ID('G_SLIDER') )->SetValue( $g ); $self->FindWindow( $self->ID('B_SLIDER') )->SetValue( $b ); my $rgb = $self->FindWindow( $self->ID('RGB_PANEL') ); $rgb->Refresh; # or Clear ;) $rgb->SetBackgroundColour( new Wx::Colour( $r, $g, $b ) ); } sub OnAbout { my( $self, $event ) = @_; # display a simple about box (i just keep copying and pasting this) Wx::MessageBox( qq[ ${\__PACKAGE__} $VERSION Created by podmaster of perlmonks.org fame running on wxPerl $Wx::VERSION ${\wxVERSION_STRING()} This program is released under the same terms as perl itself (if you don't know what that means, visit http://perl.com ) To learn more about wxPerl visit http://wxperl.sf.net/ ], "About ${\__PACKAGE__} $VERSION", # TITLE wxOK | wxICON_INFORMATION, $self ); } ##### GGGUI GENERATORs sub BOXS { my( $self, $parent, $str, $orient ) = @_; return Wx::StaticBoxSizer->new( Wx::StaticBox->new( $parent, $self->ID(time.{}.rand), # so I can register OnAbout $str, ,), $orient, ,); } sub ID { ## ALL KEYS ARE UPPERCASED my($self, $key, $dontCreate ) = @_; return $self->{"\0ID_"} if not defined $key; $self->{"\0I"} ||=6660; # the perpetual ID incrementor $key = uc($key); if(exists $self->{"\0ID_"}->{$key} ) { return $self->{"\0ID_"}->{$key}; } else { return 0 if $dontCreate; return $self->{"\0ID_"}->{$key} = ++$self->{"\0I"}; } } sub GUI { my( $self, $parent ) = @_; my $RSizer = $self->BOXS($parent, "v. Red", wxVERTICAL); my $RScroll = Wx::Slider->new( $parent, $self->ID('R_SLIDER'), 255, 0, 255, [-1,-1], [-1,-1], wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS # not nice imho ;( ## wxSB_HORIZONTAL ## no different thant wxSL_HORIZONTAL ); $RSizer->Add( $RScroll, 1, wxGROW | wxALIGN_CENTRE, 0); my $GSizer = $self->BOXS($parent, "v. Green", wxVERTICAL); my $GScroll = Wx::Slider->new( $parent, $self->ID('G_SLIDER'), 255, 0, 255, [-1,-1], [-1,-1], wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS # not nice imho ;( ); $GSizer->Add( $GScroll, 1, wxGROW | wxALIGN_CENTRE, 0); my $BSizer = $self->BOXS($parent, "v. Blue", wxVERTICAL); my $BScroll = Wx::Slider->new( $parent, $self->ID('B_SLIDER'), 255, 0, 255, [-1,-1], [-1,-1], wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS # not nice imho ;( ); $BSizer->Add( $BScroll, 1, wxGROW | wxALIGN_CENTRE, 0); my $Hex2RGB = Wx::Button->new( $parent, $self->ID('HEX2RGB_BUTTON'), "HEX TO RGB", wxDefaultPosition, wxDefaultSize, wxNO_BORDER ); my $HexText = Wx::TextCtrl->new( $parent, $self->ID('HEX_TEXT'), '#FFFFFF', [-1,-1], [-1,-1], ); my $StaticLine = new Wx::StaticLine( $parent, $self->ID('HEX_LINE'), [-1,-1], [-1,-1], wxLI_HORIZONTAL | wxSIMPLE_BORDER | wxCLIP_CHILDREN ); warn $_.' '.$StaticLine->GetBackgroundColour->$_ for qw/Red Green Blue/; warn $_.' '.$StaticLine->GetForegroundColour->$_ for qw/Red Green Blue/; $StaticLine->Show(1); # won't cut it, but a string will, imagine that?? $StaticLine->Show('string'); ## the following don't do anything, WTF??? $StaticLine->Refresh(); $StaticLine->Clear(); $StaticLine->SetBackgroundColour( new Wx::Colour(0,0,255) ); # RED $StaticLine->SetForegroundColour( new Wx::Colour(0,0,255) ); warn $_.' '.$StaticLine->GetBackgroundColour->$_ for qw/Red Green Blue/; warn $_.' '. $StaticLine->GetForegroundColour->$_ for qw/Red Green Blue/; my $ButtonSizer = Wx::BoxSizer->new( wxHORIZONTAL ); $ButtonSizer->Add( $Hex2RGB, 0, wxCENTRE | wxALIGN_LEFT | wxALL, 5 ); $ButtonSizer->Add( $StaticLine, 1, wxCENTRE | wxGROW, 5 ); $ButtonSizer->Add( $HexText, 0, wxCENTRE | wxALIGN_RIGHT| wxALL, 5 ); my $RGBSizer = Wx::BoxSizer->new( wxVERTICAL ); $RGBSizer->Add( $RSizer, 1, wxGROW | wxALIGN_CENTRE, 5 ); $RGBSizer->Add( $GSizer, 1, wxGROW | wxALIGN_CENTRE, 5 ); $RGBSizer->Add( $BSizer, 1, wxGROW | wxALIGN_CENTRE, 5 ); $RGBSizer->Add( $ButtonSizer, 1, wxGROW | wxALIGN_CENTRE, 5 ); my $RGBPanel = Wx::Panel->new( $parent, $self->ID('RGB_PANEL'), [-1, -1], [100, -1], ); $RGBPanel->SetBackgroundColour( new Wx::Colour(255, 255, 255) ); # white my $RGBPanelSizer = $self->BOXS($parent, "h. RGB", wxHORIZONTAL); $RGBPanelSizer->Add( $RGBPanel, 1, wxGROW | wxALIGN_CENTRE, 5 ); my $RootSizer = Wx::BoxSizer->new( wxHORIZONTAL ); $RootSizer->Add( $RGBSizer, 1, wxGROW | wxALIGN_CENTRE, 5 ); $RootSizer->Add( $RGBPanelSizer, 0, wxGROW | wxALIGN_CENTRE, 5 ); $parent->SetAutoLayout( 1 ); $parent->SetSizer( $RootSizer ); # $RootSizer->Fit( $parent ); # cause I don't want it fitted $RootSizer->SetSizeHints( $parent ); return $RootSizer; } package Wx::HexOrRgb::App; use strict; use Wx; use base qw(Wx::App); sub OnInit { my( $self ) = @_; my( $frame ) = new Wx::HexOrRgb(); $frame->Show(1); $frame->Refresh(); 1; } package main; # if this file is invoked directly (not use'd), run the app unless( caller() ) { Wx::HexOrRgb::App->new()->MainLoop(); } __END__ =head1 AUTHOR podmaster - http://perlmonks.org/index.pl?node=podmaster =head1 LICENSE Copyright D.H ( podmaster ) http://crazyinsomniac.perlmonk.org 2002, All rights reserved. This program is released under the same terms as perl itself (if you don't know what that means, visit http://perl.com ) =cut http://perlmonks.org/index.pl?node_id=155288;#Holy Getopt::Long, Pod::Usage Man! __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com |
From: David K. <da...@po...> - 2002-09-01 15:19:35
|
Has anyone successfully converted a simple "hello world" wxPerl script into an .exe using the Activestate PDK's PerlApp utility? i've been trying all day with no joy. the .exe failed silently until i tried compiling it without the -gui option. after droppping the -gui, i see this error on stderr (at run time, not compile time): Can't load 'auto/Wx/Wx.dll' for module Wx: load_file:One of the library files ne eded to run this application cannot be found at /PerlApp/DynaLoader.pm line 212. but the "verbose" perlapp output (below) clearly shows that perlapp found and included the Wx.dll: PerlApp 4.0.0 build 401 Copyright (C) ActiveState Corp 2001-2002. All rights reserved. Commercial license for David Kaufman <da...@gi...> +++ C:/Perl/lib/AutoLoader.pm +++ C:/Perl/lib/Carp.pm +++ C:/Perl/lib/Carp/Heavy.pm +++ C:/Perl/lib/Config.pm +++ DynaLoader.pm (internal) +++ C:/Perl/lib/Errno.pm +++ C:/Perl/lib/Exporter.pm +++ C:/Perl/lib/Exporter/Heavy.pm +++ C:/Perl/lib/File/Glob.pm +++ C:/Perl/lib/Text/ParseWords.pm +++ C:/Perl/lib/Tie/Handle.pm +++ C:/Perl/site/lib/Wx.pm +++ C:/Perl/site/lib/Wx/App.pm +++ C:/Perl/site/lib/Wx/Bitmap.pm +++ C:/Perl/site/lib/Wx/Brush.pm +++ C:/Perl/site/lib/Wx/Caret.pm +++ C:/Perl/site/lib/Wx/Colour.pm +++ C:/Perl/site/lib/Wx/ComboBox.pm +++ C:/Perl/site/lib/Wx/ControlWithItems.pm +++ C:/Perl/site/lib/Wx/Cursor.pm +++ C:/Perl/site/lib/Wx/DC.pm +++ C:/Perl/site/lib/Wx/DND.pm +++ C:/Perl/site/lib/Wx/DropSource.pm +++ C:/Perl/site/lib/Wx/Event.pm +++ C:/Perl/site/lib/Wx/FS.pm +++ C:/Perl/site/lib/Wx/Grid.pm +++ C:/Perl/site/lib/Wx/Help.pm +++ C:/Perl/site/lib/Wx/Html.pm +++ C:/Perl/site/lib/Wx/Icon.pm +++ C:/Perl/site/lib/Wx/Image.pm +++ C:/Perl/site/lib/Wx/ImageList.pm +++ C:/Perl/site/lib/Wx/ListCtrl.pm +++ C:/Perl/site/lib/Wx/Locale.pm +++ C:/Perl/site/lib/Wx/MDI.pm +++ C:/Perl/site/lib/Wx/Menu.pm +++ C:/Perl/site/lib/Wx/Pen.pm +++ C:/Perl/site/lib/Wx/Print.pm +++ C:/Perl/site/lib/Wx/RadioBox.pm +++ C:/Perl/site/lib/Wx/Rect.pm +++ C:/Perl/site/lib/Wx/Region.pm +++ C:/Perl/site/lib/Wx/STC.pm +++ C:/Perl/site/lib/Wx/ScreenDC.pm +++ C:/Perl/site/lib/Wx/Sizer.pm +++ C:/Perl/site/lib/Wx/SplashScreen.pm +++ C:/Perl/site/lib/Wx/StaticBitmap.pm +++ C:/Perl/site/lib/Wx/Timer.pm +++ C:/Perl/site/lib/Wx/ToolBar.pm +++ C:/Perl/site/lib/Wx/TreeCtrl.pm +++ C:/Perl/site/lib/Wx/Window.pm +++ C:/Perl/site/lib/Wx/_Constants.pm +++ C:/Perl/site/lib/Wx/_Exp.pm +++ C:/Perl/site/lib/Wx/_Functions.pm +++ C:/Perl/site/lib/Wx/_Inheritance.pm +++ C:/Perl/site/lib/Wx/_Ovl.pm +++ XSLoader.pm (internal) +++ C:/Perl/lib/auto/DynaLoader/autosplit.ix +++ C:/Perl/lib/auto/DynaLoader/dl_expandspec.al +++ C:/Perl/lib/auto/DynaLoader/dl_find_symbol_anywhere.al +++ C:/Perl/lib/auto/DynaLoader/dl_findfile.al +++ C:/Perl/lib/auto/File/Glob/Glob.dll +++ C:/Perl/lib/auto/File/Glob/autosplit.ix +++ C:/Perl/site/lib/auto/Wx/Wx.dll +++ C:/Perl/lib/base.pm +++ C:/Perl/lib/fields.pm +++ C:/Perl/lib/overload.pm +++ C:/Perl/lib/strict.pm +++ C:/Perl/lib/vars.pm +++ C:/Perl/lib/warnings.pm +++ C:/Perl/lib/warnings/register.pm Created 'test.exe' any help would be greatly appreaciated, -dave |
From: Marco T. <mt...@so...> - 2002-09-01 09:49:57
|
> > hello > > > > i've a question concerning wxListItems. > > Is it possible to get if the item has a bold font or not? > > > > greeting > > Marco > > > > PS: please CC to me, i'm not in the list. thanks. > > > here is the basic idea: > > first get the item to wxListItem using: > wxListCtrl::GetItem() > im not sure but i think the wxLIST_MASK_TEXT > mask should be set on the item > > then get the font of the item using: > wxListItem::GetFont() > > then test the weight of the font using: > wxFont::GetWeight() & wxBOLD > > and if that returns true, it is bold.. hey matthia, this is exactly what i tried but what doesn't work, right? if not, can you give an example what he's talking about? thanks Marco |
From: Scott L. <sla...@th...> - 2002-08-31 06:47:32
|
On Mon, 26 Aug 2002, Mattia Barbon wrote: > This is maily for Marcus, but might interest others. > There are two ways to workaround the bug you reported > (I suddenly realized that I did not explain the workaround, sorry) > 1 - Call directly ->InsertItemPrev (if the 2nd argument is a > Wx::TreeItemId) or ->InsertItemBef (if the 2nd argument is an > integer) > 2 - do this, after the "use Wx;" > undef *Wx::TreeCtrl::InsertItem; > *Wx::TreeCtrl::InsertItem = sub { > my $this = shift; > > if( ref( $_[1] ) && $_[1]->isa( 'Wx::TreeItemId' ) ) > { return $this->InsertItemPrev( @_ ) } > return $this->InsertItemBef( @_ ); > } Hi, I don't remember seeing the oringal bug report, but I found a problem with InsertItem yesterday too and I think the problem you give above must be the same one. I had this patch, but perhaps it's irrelevant: --- TreeCtrl.pm.orig Thu May 2 16:28:28 2002 +++ TreeCtrl.pm Thu Aug 29 18:33:36 2002 @@ -29,7 +29,7 @@ sub InsertItem { my $this = shift; - if( isa( $_[1], 'Wx::TreeItemId' ) ) { return $this->InsertItemPrev( @_ ) } + if( UNIVERSAL::isa( $_[1], 'Wx::TreeItemId' ) ) { return $this->InsertItemPrev( @_ ) } return $this->InsertItemBef( @_ ); } It simply calls `isa' in the correct (UNIVERSAL) package. Also, I wished to not hack wxPerl (or allow that possibly someone already installed an earlier version), so I used this in my application: BEGIN { *Wx::TreeCtrl::isa = *UNIVERSAL::isa } It aliases the bogus `isa' in TreeCtrl package to be in the UNIVERSAL package instead. :) |
From: <so...@bl...> - 2002-08-30 06:50:15
|
> > you putted the EVT_CLOSE to the wrong place... > > > > or do you have a reason why you need it to be there? > > $app ist not the window, but you could use EVT_CLOSE on $frame too. > > I know that EVT_CLOSE is for frame. What I want is a event for the app,= when > the app goes to be closed! Maybe the only way is to check the close in the > topwindow! ah, ok. that's easy if you don't want to veto the exit: ### code start my($app) =3D MyApp->new(); $app->MainLoop(); print "here's definitly the last point before the application exits\n"; ### code end >> i changed your minimal sample that it works. >> hope it helps >Thanks for the help. hope this is what you search and it helps moore this time :-) greeting Marco |
From: Graciliano M. P. \(V. Sites\) <gm...@vi...> - 2002-08-30 06:10:41
|
> you putted the EVT_CLOSE to the wrong place... > > or do you have a reason why you need it to be there? > $app ist not the window, but you could use EVT_CLOSE on $frame too. I know that EVT_CLOSE is for frame. What I want is a event for the app, when the app goes to be closed! Maybe the only way is to check the close in the topwindow! > > i changed your minimal sample that it works. > hope it helps Thanks for the help. Graciliano M. P. |
From: Mattia B. <mb...@ds...> - 2002-08-29 20:11:17
|
> When I try to close the TopWindow Frame it would have to call the > EVT_QUERY_END_SESSION, don't? No, EVT_QUERY_END_SESSION should be called when you close the session (i.e Start menu -> Shutdown under Windows). Use EVT_CLOSE (as suggested by Marco Trudel). Regards Mattia |
From: Mattia B. <mb...@ds...> - 2002-08-29 20:11:14
|
> How can I Destroy/Disconect an Event? > > I know that I can do this, using EVT_CLOSE like an example: > > ## Set event > EVT_CLOSE($frame , \&OnClose) ; > > ## Disconect event: > $frame->Disconnect( -1, -1, &Wx::wxEVT_CLOSE_WINDOW ) ; > > But is there a better?! Not yet. > In this way we need to open the source of Event.pm to find > &Wx::wxEVT_CLOSE_WINDOW and I don't know if for all the events I just need > to past these 3 args to Disconect! In wxPerl 0.12 unsing EVT_FOO( ..., undef ) will do a ->Disconnect with the right parameters. ( it is in CVS, should work, not tested yet ). > I want to do this because, when you set an event, you need to Disconnect the > previus first to can set it again! > Another thing, if you set the event 2 times, with different subs, when you > disconnect once, the second event will be the new sub. In other words, if > you set 2 subs to an event, only 1 will run, until you delete it, and the > next will be running. Regards Mattia |
From: Mattia B. <mb...@ds...> - 2002-08-29 20:11:07
|
> hello > > i need to know if a wxListItem has a bold font or not. i thought this would be > easy to get with: > print "bold\n" if($listCtrl->GetItem($i)->GetFont->GetWeight == wxBOLD); > > but this crashes perl (win98, wxPerl0.10) It appears there is no way to get the font of an item. You could try asking this on wx-users. Regards Mattia > i was really confused and tried this: > > > my $item = Wx::ListItem->new; > > my $font = Wx::Font->new(8, wxDEFAULT, wxNORMAL, wxBOLD); > > $item->SetFont($font); > > print $font->GetWeight . " -> " . $item->GetFont->GetWeight . "\n"; > > $font->GetWeight works here. The problem is that ->GetItem does not retrieve any font, hence the font returned by ->GetFont is not valid. |
From: Mattia B. <mb...@ds...> - 2002-08-29 20:10:00
|
> > > Is there a name for the default background colour of a frame, a panel or > > > whatever Wx::Window derrivate? I tried to set the background colour of a > > > selected button, and tried to reset it back to its original value, and > > > thought that would be wxLIGHT_GREY, but that seems to be a bit darker > > > than the default backgroundcolour. > > Wx::SystemSetting::GetColour; I think the colour you want is > > wxSYS_COLOUR_WINDOW. > > > > HTH > > Mattia [ You should direct such questions to wxperl-users, not me personally ] > Speaking of color, I posted a question regarding color a while back, but did > not get a solution that worked. I have an app with a status bar, and I want Sorry, I must have overlooked it. > to be able to change the font color of the message to reflect the message > type. For example, error messages are red, success messages are blue, etc. > Is there a way to do this? The solution is creating a wxStaticText child of the status bar, displaying the text in the correct colour; from the OnSize handler in the status bar, resize the control to match the size of one of the status bar field (get the size using Wx::StatusBar->GetFieldRect). HTH Mattia |
From: Marco T. <mt...@so...> - 2002-08-29 19:39:24
|
you putted the EVT_CLOSE to the wrong place... or do you have a reason why you need it to be there? $app ist not the window, but you could use EVT_CLOSE on $frame too. i changed your minimal sample that it works. hope it helps greeting Marco ---- use Wx; ########################### package MyApp; use strict; use vars qw(@ISA); @ISA=qw(Wx::App); sub OnInit { my( $this ) = @_; my( $frame ) = MyFrame->new( "Minimal wxPerl app", Wx::Point->new( 50, 50 ), Wx::Size->new( 450, 350 ) ); $this->SetTopWindow( $frame ); $frame->Show( 1 ); 1; } ########################### package MyFrame; use strict; use vars qw(@ISA); @ISA=qw(Wx::Frame); use Wx::Event qw(EVT_CLOSE); sub new { my( $class ) = shift; my( $this ) = $class->SUPER::new( undef, -1, $_[0], $_[1], $_[2] ); EVT_CLOSE( $this , \&onClose); $this; } sub onClose { my ($this, $event) = @_; print "try to close...\n"; $event->Skip; # allow to close } ########################### package main; my ($app) = MyApp->new(); $app->MainLoop(); |
From: Graciliano M. P. \(V. Sites\) <gm...@vi...> - 2002-08-29 19:14:55
|
> >When I try to close the TopWindow Frame it would have to call the > >EVT_QUERY_END_SESSION, don't? > > > >What I'm doing wrong? > > > > use Wx ; > > use Wx::Event qw(EVT_QUERY_END_SESSION) ; > > > > EVT_QUERY_END_SESSION( $app , \&OnTryExit ) ; > > > >But the sub OnTryExit() was never called! > > use: > use Wx::Event qw(EVT_CLOSE); > EVT_CLOSE($app, \&OnTryExit); This doesn't work too!I tried this 3 events and nothing: EVT_END_SESSION EVT_QUERY_END_SESSION EVT_CLOSE I'm using wxPerl 0.11 (final release) and Perl-5.8.0 Graciliano M. P. |
From: Liney, D. <Dav...@co...> - 2002-08-29 18:15:30
|
I am using FlexGridSizer to layout a window and am having problems getting a Panel to display when added to the Sizer with the Panel or its row set not to grow. If I set it to grow then it displays. Also when I remove the Panel and have the StaticTexts as children of $this then the content displays. I want the Panel to be only as high as it needs to be to display its content (message headers) leaving the rest of the window for the message text. Which is why I don't want to set wxGROW or AddGrowableRow(). I am using a Panel so I can set the background and a border around a collection of StaticTexts. The testcase below shows the problem. If I remove the wxGROW from line 48 or comment out line 52 the the Panel doesn't display. Can someone tell me what I am doing wrong as I have tried everything I can think of without success? I am using WxPerl 0.11 with ActivePerl Build 629. Thanks, Dave Liney. ------------------------------------------------------------ #!/usr/bin/perl -w use strict; use Wx; ##### PanelSizer::Frame ##### package PanelSizer::Frame; use base qw(Wx::Frame); use Wx qw(:everything); sub new { my $class = shift; my $this = $class->SUPER::new( undef, -1, "PanelSizer", wxDefaultPosition, [ 400, 300 ]); my $headpanel = Wx::Panel->new( $this, -1, wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER); $headpanel->SetBackgroundColour(wxLIGHT_GREY); my $headsizer = Wx::FlexGridSizer->new(2, 2, 0, 10); $headsizer->Add( Wx::StaticText->new($headpanel, -1, "Message ID:"), 1, wxLEFT, 2); $headsizer->Add( Wx::StaticText->new($headpanel, -1, "669948"), 1); $headsizer->Add( Wx::StaticText->new($headpanel, -1, "Date:"), 1, wxLEFT, 2); $headsizer->Add( Wx::StaticText->new($headpanel, -1, "28th August 2002"), 1); $headsizer->AddGrowableCol(1); $headpanel->SetSizer($headsizer); $headpanel->SetAutoLayout(1); my $textsizer = Wx::FlexGridSizer->new(2, 1, 0, 0); my $message = Wx::StaticText->new($this, -1, "Message text.\nMessage text.\nMessage text.\nMessage text.", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxSP_NOBORDER); $message->SetBackgroundColour(wxWHITE); $textsizer->Add($headpanel, 1, wxGROW); # Line 48 $textsizer->Add($message, 1, wxGROW); $textsizer->AddGrowableCol(0); $textsizer->AddGrowableRow(0); # Line 52 $textsizer->AddGrowableRow(1); $this->SetSizer($textsizer); $this->SetAutoLayout(1); return $this; } ##### PanelSizer::App ##### package PanelSizer::App; use base qw(Wx::App); sub OnInit { PanelSizer::Frame->new->Show(1); } ##### main ##### package main; PanelSizer::App->new->MainLoop(); |
From: Marco T. <mt...@so...> - 2002-08-29 06:08:01
|
>When I try to close the TopWindow Frame it would have to call the >EVT_QUERY_END_SESSION, don't? > >What I'm doing wrong? > > use Wx ; > use Wx::Event qw(EVT_QUERY_END_SESSION) ; > > EVT_QUERY_END_SESSION( $app , \&OnTryExit ) ; > >But the sub OnTryExit() was never called! use: use Wx::Event qw(EVT_CLOSE); EVT_CLOSE($app, \&OnTryExit); greeting Marco |
From: Graciliano M. P. \(V. Sites\) <gm...@vi...> - 2002-08-29 02:10:20
|
When I try to close the TopWindow Frame it would have to call the EVT_QUERY_END_SESSION, don't? What I'm doing wrong? use Wx ; use Wx::Event qw(EVT_QUERY_END_SESSION) ; EVT_QUERY_END_SESSION( $app , \&OnTryExit ) ; But the sub OnTryExit() was never called! Graciliano M. P. |
From: Graciliano M. P. \(V. Sites\) <gm...@vi...> - 2002-08-29 00:05:27
|
How can I Destroy/Disconect an Event? I know that I can do this, using EVT_CLOSE like an example: ## Set event EVT_CLOSE($frame , \&OnClose) ; ## Disconect event: $frame->Disconnect( -1, -1, &Wx::wxEVT_CLOSE_WINDOW ) ; But is there a better?! In this way we need to open the source of Event.pm to find &Wx::wxEVT_CLOSE_WINDOW and I don't know if for all the events I just need to past these 3 args to Disconect! I want to do this because, when you set an event, you need to Disconnect the previus first to can set it again! Another thing, if you set the event 2 times, with different subs, when you disconnect once, the second event will be the new sub. In other words, if you set 2 subs to an event, only 1 will run, until you delete it, and the next will be running. Graciliano M. P. |
From: Marco T. <mt...@so...> - 2002-08-28 22:24:24
|
hello i need to know if a wxListItem has a bold font or not. i thought this would be easy to get with: print "bold\n" if($listCtrl->GetItem($i)->GetFont->GetWeight == wxBOLD); but this crashes perl (win98, wxPerl0.10) i was really confused and tried this: > my $item = Wx::ListItem->new; > my $font = Wx::Font->new(8, wxDEFAULT, wxNORMAL, wxBOLD); > $item->SetFont($font); > print $font->GetWeight . " -> " . $item->GetFont->GetWeight . "\n"; $font->GetWeight works here. but the other one causes perl to crash too. so, can't i use GetFont as i can with SetFont? if yes, how can i get if the current item has a bold font or not? greeting Marco |
From: Simon F. <sim...@bb...> - 2002-08-28 21:18:06
|
<snip excellent tutorial> > // you can use _CallCallback( ...., G_SCALAR, "ii", 1, 1 ); > // to pass arguments to the callback; I will document the valid > // flag letters ASAP No problem, I found those flag letters in helpers.cpp. I think I understand what they mean from that. I've got a wxPlDocument that compiles. Although it probably only works for the 'bool' and 'void' methods. I'll work on that tomorrow and keep you posted. Thanks again for the help. Simon BBCi at http://www.bbc.co.uk This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. |
From: Mattia B. <mb...@ds...> - 2002-08-28 20:45:21
|
> hello, > maybee stupid questions with a simple solution, > but i'm really unable to find it. > > 1. how can i get the number of columns in a listctrl? GetColumnCount (missing from the docs, will add). > 2. how can i get the label of a columnheader? GetColumn, as far as I can see on the docs. Regards Mattia P.S.: with mtrudel at soapy.ch I think you totalized four different addresses ;-) |
From: Marco T. <mt...@so...> - 2002-08-28 20:22:51
|
hello, maybee stupid questions with a simple solution, but i'm really unable to find it. 1. how can i get the number of columns in a listctrl? 2. how can i get the label of a columnheader? thanks & greeting Marco |
From: Simon F. <sim...@bb...> - 2002-08-28 15:56:28
|
I suppose the other alternative, is to assume that users will only ever use Wx::ClassInfo for Perl objects and modify Wx::ClassInfo to hook into a wxPlClassInfo. I know the CLASSINFO() is used elsewhere, wxFrameLayout I think. But I suppose it will be much more common to want to use classinfo for perl classes. Simon > -----Original Message----- > > Hi, > > > > I am working on implimenting wxWindows' doc/view framework > in wxPerl. I've > > got about 95% of the XS done and it compiles ok, but I'm > having a problem > WOW! This is really impressive! > > > with wxDocTemplate/wxClassInfo. > > > The wxDocTemplate constructor looks like this: > > > > Wx_DocTemplate * > > Wx_DocTemplate::new(manager, descr, filter, dir, ext, > docTypeName, > > viewTypeName, docClassInfo, > viewClassInfo, flags) > > Wx_DocManager* manager > > wxString descr > > wxString filter > > wxString dir > > wxString ext > > wxString docTypeName > > wxString viewTypeName > > Wx_ClassInfo* docClassInfo > > Wx_ClassInfo* viewClassInfo > > long flags > > > > The wxDocTemplate needs wxClassInfo objects for the > document and view > > classes, so it can create the documents/views automatically > when they are > > needed. I think this probably works ok if I use c++ classes > it already knows > Yes, it should > > > about such as wxDocument and wxView. Obviously wxClassInfo > doesn't know > > anything about perl classes, so I can't create a classinfo > object for > > "MyDocument" and "MyView". > Yes; the alternative (as explained in wxDT::wxDT docs) is to override > CreateDocument; to be able to do this you need a wxPlDocTemplate class > (see below). > > > At the moment, I've got this in my test script: > > > > my $ci_doc = Wx::ClassInfo::FindClass("wxDocument"); > > my $ci_view = Wx::ClassInfo::FindClass("wxView"); > > my $docmanager = Wx::DocManager->new( 1, 1 ); > > my $doctemplate = Wx::DocTemplate->new($docmanager, > "XML", "*.xml", "", > > "xml", "MyDoc", > "MyView", $ci_doc, > > $ci_view, 1 ); > > my $frame = new Wx::DocParentFrame($docmanager, undef, > -1, "DocView > > Demo", > > wxDefaultPosition, > wxDefaultSize, > > wxDEFAULT_FRAME_STYLE); > > > > > > So far I'm getting encouraging results for Wx::DocManager. > When I click on > > File -> Open, it automatically pops up a file selector for > *.xml files. But > > when I try and open one it crashes. I think this is because > > wxView::OnCreate() isn't doing anything. > Possibly > > > What I'd like to be able to do is something like this: > > > > my $ci_doc = Wx::ClassInfo::FindClass("My::Document"); > > my $ci_view = Wx::ClassInfo::FindClass("My::View"); > > > > Although we might need a different method name so we can > still handle c++ > > classes in the same way. My problem is that I don't know > how to impliment > > this. We'd need to override Wx::ClassInfo->CreateObject() or > > wxClassInfo::m_objectConstructor. > It is sufficient to override ->CreateObject. > > > I don't think I'm experienced enough to do this, but even > if I were, I'd > > want to make sure that I did it in a way that was > compatible with wxPerl > > development. > > > > If I can get this working I'll submit a patch to add the > document/view > > framework. If not, I'll give you what I've done so far so > you don't need to > > repeat what I've already done. > > > > By the way Mattia, I'm interested to know what the > wxPl...... classes are > > for? Do we need something like that here? It looks like > there are some > > useful functions in cpp/helpers.cpp > The wxPlFoo classes are used when: > 1 - you need to have a C++ virtual function overridable from Perl > (for example wxSizer::RecalcSizes) > 2 - you want the C++ object to store a reference to the Perl object; > for example Wx::Icon does not use a wxPlIcon (just a wxIcon) > hence $frame->SetIcon( $icon1 ); $icon2 = $frame->GetIcon(); > $icon1 and $icon2 will be different Perl-level objects > OTOH when you do $button1 = Wx::Button->new( $parent, ... ); > $button2 = ($parent->GetChildren())[0]; $button1 and $button2 > should be the same Perl-level object, and this is possible because > a wxPlButton is used > 3 - some other utility classes are named wxPlFoo or wxPliFoo > > We need these classes here, because wxDoc/View uses virtual > functions a lot. I will post a more detailed explanation in > another mail. > > Regards > Mattia > BBCi at http://www.bbc.co.uk This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. |