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: Mitchell N C. <mch...@ve...> - 2002-09-13 19:38:16
|
This is a quick how-to-get-started note on using Inline::CPP with wxPerl. wxPerl is a Perl wrapper for the popular wxWindows C++ GUI toolkit. The Inline and Inline::CPP (C++) perl modules allow you to put C++ source code directly in Perl source. Glue code generation, compilation (cached), and dynamic linking are handled automagically. They can also be used from Python via Zope-Perl. However, it is _not_ clear one should _want_ to use Inline with wxPerl. Inline is still rather immature, wxPerl is already fast, and I've seen only low-order 10x speedups. But there are still some applications. And you might simply wish to play. If so, this note might save you perhaps an hour or so. Here are the parts we'll need: Inline and Inline::CPP are available from CPAN as usual. Here is documentation, http://search.cpan.org/author/INGY/Inline-0.43/Inline.pod http://search.cpan.org/author/NEILW/Inline-CPP-0.24/CPP.pod and a mailinglist http://www.mail-archive.com/inline%40perl.org/ wxPerl is also available from CPAN, and from its homepage http://wxperl.sourceforge.net/ . It too has a mailinglist http://www.geocrawler.com/lists/3/SourceForge/8008/0/ . Before installing wxPerl, one must first install wxWindows http://www.wxwindows.org/ . I used wxWindows GTK 2.2.9 (from sources, but that shouldn't be necessary), wxPerl Wx-0.11 (keep the sources, we'll need them), Inline 0.43, Inline::CPP 0.23 (the current 0.24 should be fine). Just so we are clear, before you invest a lot of time, my conflation of these, which I'm about to sketch, might charitably be described as an untested toy. But they are themselves nifty packages, and arguably worth having in their own rights. So, you've installed all of these, the Inline automated tests went fine, the wxPerl Wx-0.11/demo/demo.pl works (more or less), as do examples from the Inline::CPP manpage. Ok, our task is to take some things from the wxPerl installation, which it normally doesn't hand out, and then give them to Inline. We are about to create various files and directories. Their locations are arbitrary. I'll suggest some plausible installation-ish locations, but you could drop them all in /tmp/plaything/ and be fine. (1) Find where the wxPerl (Wx-0.11) installation installed Wx.so . Someplace like /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/Wx/Wx.so Create a libWx.so symbolic link to it (ln -s Wx.so libWx.so) so we can dynamically load it in later. Remember the directory of libWx.so (#1). (2) Copy Wx-0.11/typemap from the Wx-0.11 sources to someplace like /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Wx/typemap Someday wxPerl will do this itself. Remember the filename (#2). (3) We'll need some of the Wx-0.11 header files. You could just leave them as-is in the source directory. I'll create a /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Wx/include and copy Wx-0.11/cpp/ there. So now I have a /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Wx/include/cpp/ with a few .h files. Remember the include/ directory (#3). (4) Open the Wx-0.11/GDI.xs source file. We need a copy of the (regrettably extensive) preprocessor magic needed to use the wxPerl glue code from C++. Pause to appreciate the folly of copying application-internal code which may change with each new version of Wx. (4a) Copy the preprocessor stuff from the top, down to #undef THIS. Ie, just before the first Module= declaration, but not including the WXPLI_BOOT_ONCE or wxPli_boot_Wx_GDI lines. (4b) Add #define _WXP_DEFINE_CLASSNAME 1 just before the #include "cpp/typedef.h". Your result should look something like the example attached below. (4c) Save this someplace. I'll call it wx_inline.h, and put it in /usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Wx/include/ so we don't have to keep track of yet another directory. Ok, that is it for the wxPerl side. Whew. (Though I probably forgot something, as I didn't scrub down my system an rebuild... apologies in advance...) Now, all we need to do, is to feed this accumulated information, and a bit more, to Inline. The basic approach is BEGIN { $wx_libWx_directory = "/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/Wx/"; #1 $wx_typemap_filename = "/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Wx/typemap"; #2 $wx_include_directory = "/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Wx/include/"; #3 chomp($wx_config_libs = `wx-config --libs`); chomp($wx_config_cxxflags = `wx-config --cxxflags`); }; use Inline (CPP => Config => LIBS => "-L$wx_libWx_directory -lWx", TYPEMAPS => $wx_typemap_filename, ALTLIBS => $wx_config_libs, CCFLAGS => ($wx_config_cxxflags ." -I$wx_include_directory") ); Then we can write things like use Inline CPP => <<'ENDMARKER'; #include "wx_inline.h" #include <wx/wx.h> #include <wx/dc.h> void foo(Wx_Frame* f) { Wx_DC* dc = new Wx_PaintDC(f); int i; for(i=0;i<20000000;i++) { dc->DrawEllipse( 20, 20, 50, 50 ); } } ENDMARKER and call them normally in perl $frame = SomeFrame->new(); &foo($frame); And that is all there is to it. You can now write wxWindows C++ code in your perl files, and apply it to wxPerl objects. That sentence gives me the shivers. Hey kids, you can use shaped charges to open cans of worms. Please note, we have taken one layer of foreign function interface glue code, traditionally one of the most gotcha-laden areas of software engineering, to a GUI no less, and are now cheerfully troweling in another layer of it. I encourage an effort to remember that premature optimization perhaps belongs up there with stupidity as a mortal sin. 'Nuff said. Some asides: The BEGIN was needed so the variables would be available when perl is starting up, at perl "compiletime", which is when Inline code will usually be built. (Though Inline works just fine at "runtime" too, so one can do dynamic code generation! Which I discuss on http://www.vendian.org/mncharity/dir3/inline/ :). Wx_Whatever is wxPerl's typedef'ed alias for wxWindows's Wx::Whatever. You may find this perl invocation useful when debugging Inline code: perl -MInline=FORCE,INFO,NOCLEAN -w filename.pl It will FORCE (re)compilation even if there is a cached version (Inline doesn't yet hash on library and compiler argument information, so the cache can become invalid during development), provide INFO on the compile, and with NOCLEAN, will leave the "temporary" build files behind, even after a successful compilation, so you can see what was built. Also, fyi, you will likely be repeatedly looking at ./_Include/build/mumblemumble/out.make Don't draw an ellipse 20M times if its target is already being shown. You'll get an window system update each time. Weeks later... Before being shown, it might only take 5 sec, vs 35 s for pure wxPerl. End of asides. One place to get started is with Wx-0.11/samples/hello/hello.pl . Hello world. And then twiddle it with Inline. An example is attached below. Enjoy, Mitchell Charity (hey, it's friday...) ---- $ diff -U 3 hello.pl hey.pl ---- ----------------------- --- hello.pl Sun Mar 4 04:41:46 2001 +++ hey.pl Fri Sep 13 14:13:22 2002 @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w ############################################################################# ## Name: hello.pl ## Purpose: Hello wxPerl sample @@ -46,6 +46,26 @@ use Wx qw(wxDefaultPosition); use Wx qw(wxWHITE); + +no strict; +BEGIN { + $wx_libWx_directory = + "/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/Wx/"; #1 + $wx_typemap_filename = + "/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Wx/typemap"; #2 + $wx_include_directory = + "/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Wx/include/"; #3 + chomp($wx_config_libs = `wx-config --libs`); + chomp($wx_config_cxxflags = `wx-config --cxxflags`); +}; +use Inline (CPP => Config => + LIBS => "-L$wx_libWx_directory -lWx", + TYPEMAPS => $wx_typemap_filename, + ALTLIBS => $wx_config_libs, + CCFLAGS => ($wx_config_cxxflags ." -I$wx_include_directory") + ); +use strict; + sub new { # new frame with no parent, id -1, title 'Hello, world!' # default position and size 350, 100 @@ -74,8 +94,22 @@ $dc->SetFont( $this->font ); # darw a friendly message $dc->DrawText( 'Hello, world!', 10, 10 ); + + # draw an ellipse, using an Inline generated method. + $this->frobit($dc); } +use Inline CPP => <<'ENDMARKER'; +#include "wx_inline.h" +#include <wx/wx.h> +#include <wx/dc.h> +void frobit(Wx_Frame* f, Wx_DC* dc) { + Wx_DC* an_illustrative_extra_dc = new Wx_PaintDC(f); + dc->DrawEllipse( 20, 20, 50, 50 ); +} +ENDMARKER + + sub font { $_[0]->{FONT}; } ---- end ---- ----------------------------------------------- ---- hey.pl ---- -------------------------------------------- #!/usr/bin/perl -w ############################################################################# ## Name: hello.pl ## Purpose: Hello wxPerl sample ## Author: Mattia Barbon ## Modified by: ## Created: 2/11/2000 ## RCS-ID: ## Copyright: (c) 2000 Mattia Barbon ## Licence: This program is free software; you can redistribute it and/or ## modify it under the same terms as Perl itself ############################################################################# use strict; use Wx; # every program must have a Wx::App-derive class package MyApp; use vars qw(@ISA); @ISA = qw(Wx::App); # this is called automatically on object creation sub OnInit { my( $this ) = shift; # create a new frame my( $frame ) = MyFrame->new(); # set as top frame $this->SetTopWindow( $frame ); # show it $frame->Show( 1 ); } package MyFrame; use vars qw(@ISA); @ISA = qw(Wx::Frame); use Wx::Event qw(EVT_PAINT); # this imports some constants use Wx qw(wxDECORATIVE wxNORMAL wxBOLD); use Wx qw(wxDefaultPosition); use Wx qw(wxWHITE); no strict; BEGIN { $wx_libWx_directory = "/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/Wx/"; #1 $wx_typemap_filename = "/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Wx/typemap"; #2 $wx_include_directory = "/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Wx/include/"; #3 chomp($wx_config_libs = `wx-config --libs`); chomp($wx_config_cxxflags = `wx-config --cxxflags`); }; use Inline (CPP => Config => LIBS => "-L$wx_libWx_directory -lWx", TYPEMAPS => $wx_typemap_filename, ALTLIBS => $wx_config_libs, CCFLAGS => ($wx_config_cxxflags ." -I$wx_include_directory") ); use strict; sub new { # new frame with no parent, id -1, title 'Hello, world!' # default position and size 350, 100 my( $this ) = shift->SUPER::new( undef, -1, 'Hello, world!', wxDefaultPosition , [350, 100] ); # create a new font object and store it $this->{FONT} = Wx::Font->new( 40, wxDECORATIVE, wxNORMAL, wxBOLD, 0 ); # set background colour $this->SetBackgroundColour( wxWHITE ); $this->SetIcon( Wx::GetWxPerlIcon() ); # declare that all paint events will be handled with the OnPaint method EVT_PAINT( $this, \&OnPaint ); return $this; } sub OnPaint { my( $this, $event ) = @_; # create a device context (DC) used for drawing my( $dc ) = Wx::PaintDC->new( $this ); # select the font $dc->SetFont( $this->font ); # darw a friendly message $dc->DrawText( 'Hello, world!', 10, 10 ); # draw an ellipse, using an Inline generated method. $this->frobit($dc); } use Inline CPP => <<'ENDMARKER'; #include "wx_inline.h" #include <wx/wx.h> #include <wx/dc.h> void frobit(Wx_Frame* f, Wx_DC* dc) { Wx_DC* an_illustrative_extra_dc = new Wx_PaintDC(f); dc->DrawEllipse( 20, 20, 50, 50 ); } ENDMARKER sub font { $_[0]->{FONT}; } package main; # create an instance of the Wx::App-derived class my( $app ) = MyApp->new(); # start processing events $app->MainLoop(); # Local variables: # # mode: cperl # # End: # ---- end ---- ----------------------------------------------- ---- $ perl -w -MInline=FORCE,INFO hey.pl ---- -------------- <-----------------------Information Section-----------------------------------> Information about the processing of your Inline CPP code: Your source code needs to be compiled. I'll use this build directory: /a/Stable/home/mcharity/wx/_Inline/build/MyFrame_2e7a and I'll install the executable as: /a/Stable/home/mcharity/wx/_Inline/lib/auto/MyFrame_2e7a/MyFrame_2e7a.so No C++ classes have been successfully bound to Perl. The following C++ functions have been bound to Perl: void frobit(Wx_Frame * f, Wx_DC * dc); <-----------------------End of Information Section----------------------------> ---- end ---- ----------------------------------------------- --- wx_inline.h ---- ---------------------------------------- // Extracted from Wx-0.11/GDI.xs // Changed as indicated. #undef bool #define PERL_NO_GET_CONTEXT #include <wx/defs.h> #include <stdarg.h> #include "cpp/compat.h" #include "cpp/chkconfig.h" WXPL_EXTERN_C_START #include <EXTERN.h> #include <perl.h> #include <XSUB.h> WXPL_EXTERN_C_END #undef bool #undef Move #undef Copy #undef New #undef Pause #if defined( __WXMSW__ ) #undef read #undef write #undef eof #undef form #undef vform #endif #if __VISUALC__ #pragma warning (disable: 4800 ) #endif #ifdef __WXMSW__ #include <wx/msw/winundef.h> #endif // __WXMSW__ // some helper functions/classes/macros #define _WXP_DEFINE_CLASSNAME 1 // ############ for Inline #include "cpp/typedef.h" #include "cpp/helpers.h" #undef THIS ---- end ---- ----------------------------------------------- END OF MESSAGE |
From: Simon F. <sim...@bb...> - 2002-09-13 16:34:19
|
> >From Seattle Perl User's Group list...the comment about > Perl2Exe was kind of > interesting... > [...snip...] > wxPerl looks much nicer (it has the native Windows L-n-F) but for > some reason Perl2Exe does not build the final script.exe > correctly if I use WxPerl. > > [...snip...] There was a related thread titled: "how to compile wxPerl script to an .exe with PerlApp?" ...posted on 1st September to this mailing list. I suspect that it's a similar problem, (that not all required dlls are being included) but it's hard to say without any error messages. 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: Marc M. A. <Mar...@Do...> - 2002-09-13 16:24:55
|
>From Seattle Perl User's Group list...the comment about Perl2Exe was kind of interesting... -----Original Message----- Subject: SPUG: Windows Applications in Perl I have been looking into ways of making Windows GUI applications with Perl and haven't found any good options yet. [...snip...] wxPerl looks much nicer (it has the native Windows L-n-F) but for some reason Perl2Exe does not build the final script.exe correctly if I use WxPerl. [...snip...] |
From: Jouke V. <jo...@pv...> - 2002-09-12 12:53:37
|
Mattia, This is what gdb gives me: ================================================================= (gdb) set args wxChat.pl (gdb) run Starting program: /usr/bin/perl wxChat.pl [New Thread 1024 (LWP 24169)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 24169)] 0x4080bcc2 in wxString::AllocBeforeWrite () from /usr/local/lib/libwx_gtk-2.3.so (gdb) bt #0 0x4080bcc2 in wxString::AllocBeforeWrite () from /usr/local/lib/libwx_gtk-2.3.so #1 0x4080bf76 in wxString::AssignCopy () from /usr/local/lib/libwx_gtk-2.3.so #2 0x4080c09b in wxString::operator= () from /usr/local/lib/libwx_gtk-2.3.so #3 0x4084c7ab in wxHtmlWindow::Init () from /usr/local/lib/libwx_gtk-2.3.so #4 0x409e3628 in XS_Wx__HtmlWindow_new () from /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Wx/Html/Html.so #5 0x0809fb8c in Perl_pp_entersub () at eval.c:41 #6 0x08099fd8 in Perl_runops_standard () at eval.c:41 #7 0x080c0a2c in S_docatch_body () at eval.c:41 #8 0x080c0b38 in S_docatch () at eval.c:41 #9 0x080c2840 in Perl_pp_entereval () at eval.c:41 #10 0x08099fd8 in Perl_runops_standard () at eval.c:41 #11 0x0805ce14 in S_call_body () at eval.c:41 #12 0x0805c9e1 in perl_call_sv () at eval.c:41 #13 0x4053dce6 in XS_Wx___App_Start () from /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/Wx/Wx.so #14 0x0809fb8c in Perl_pp_entersub () at eval.c:41 #15 0x08099fd8 in Perl_runops_standard () at eval.c:41 #16 0x0805c57a in S_run_body () at eval.c:41 #17 0x0805c2db in perl_run () at eval.c:41 #18 0x08059f21 in main () at eval.c:41 #19 0x40091647 in __libc_start_main (main=0x8059eb0 <main>, argc=2, ubp_av=0xbffff874, init=0x80590b4 <_init>, fini=0x80e3700 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffff86c) at ../sysdeps/generic/libc-start.c:129 -- -------------------------------------------------------------------- | Jouke Visser | http://jouke.pvoice.org (personal) | | | http://www.pvoice.org (pVoice & pStory)| | Perl GUI Geek | http://wxperl.pvoice.org (wxPerl) | -------------------------------------------------------------------- |
From: Mattia B. <mb...@ds...> - 2002-09-12 10:12:20
|
> Just to be complete: here's the source of the script too Unfortunately it works for me (I had to comment out the code using the PerlMonks modules, does this change things for you?). rh71, perl-Wx-0.11-1_wxgtk2.3.3b1.i386.rpm If you have gdb installed, you may try: $ gdb perl ...gdb starts (gdb) set args wxChat.pl (gdb) run Segmentation fault (gdb) bt <<the output from this may reveal something > Jouke Visser wrote: > > > Hi, > > > > I'm trying to get a piece of code to work, but every time it tries to > > call the constructor of the Wx::HtmlWindow, it segfaults under Linux. > > I'm using RedHat 7.2, kernel 2.4.7-10, with the wxPerl 0.11 rpm for > > wxgtk 2.3.3. Does it segfault even with a smaller script (i.e. just creating a frame with an HtmlWindow (I gues not., but). > > I also ran the script with wxPerl 0.09 rpm for wxgtk 2.2.9, which > > gives exactly the same output as with 0.11. > > > > Any ideas? Unfortunately not. Sorry Mattia |
From: Scott L. <sla...@th...> - 2002-09-11 16:22:12
|
[snip regarding two errors with XRC] Thanks Mattia, it works now. (I should've looked at the C++ demo first :/ ) I attached a new version of the XRC demo (like the C++ one) if you want to use it (untarring in demo directory will overwrite existing XRC.pm and data/resource.xrc files and add some data/*.gif files). |
From: Jouke V. <jo...@pv...> - 2002-09-11 09:23:59
|
Just to be complete: here's the source of the script too Jouke Visser wrote: > Hi, > > I'm trying to get a piece of code to work, but every time it tries to > call the constructor of the Wx::HtmlWindow, it segfaults under Linux. > I'm using RedHat 7.2, kernel 2.4.7-10, with the wxPerl 0.11 rpm for > wxgtk 2.3.3. > > The output of perl -d:Trace wxChat.pl ends with: > > >> /usr/lib/perl5/site_perl/5.6.1/i386-linux/Wx.pm:96: return 1; > >> wxChat.pl:32: $self->{chattext} = Wx::HtmlWindow->new($self, > -1, [-1,-1], [400,100]); > Segmentation fault > > The same code runs on Windows XP (Activestate Perl build 633) with > wxPerl 0.11 ppm for wxmsw 2.3.3 without any problem. > > I also ran the script with wxPerl 0.09 rpm for wxgtk 2.2.9, which > gives exactly the same output as with 0.11. > > Any ideas? > > > -------------------------------------------------------------------- | > Jouke Visser | http://jouke.pvoice.org (personal) | > | | http://www.pvoice.org (pVoice & pStory)| > | Perl GUI Geek | http://wxperl.pvoice.org (wxPerl) | > -------------------------------------------------------------------- > > > > > ------------------------------------------------------- > In remembrance > www.osdn.com/911/ > _______________________________________________ > wxperl-users mailing list > wxp...@li... > https://lists.sourceforge.net/lists/listinfo/wxperl-users -- -------------------------------------------------------------------- | Jouke Visser | http://jouke.pvoice.org (personal) | | | http://www.pvoice.org (pVoice & pStory)| | Perl GUI Geek | http://wxperl.pvoice.org (wxPerl) | -------------------------------------------------------------------- |
From: Mattia B. <mb...@ds...> - 2002-09-11 08:45:42
|
[I realise that it is probably my mailer's settings fault, but I think this belongs to the list] On Wed, 11 Sep 2002, Jouke Visser wrote: >>Wx::Html - anything related to wxHtml >>Wx::Help - anything related to the help system >>Wx::Print - anything related to printing >>Wx::FS - anything related to wxFileSystem >>Wx::Grid - anything related to wxGrid >>Wx::MDI - anything related to MDI >>Wx::STC - StyledTextControl >>Wx::XRC - XML resources >>Wx - you better do that first... >> >>In case some functionality crosses the boundary you need all related >>classes (e.g. Wx::HtmlEasyPrinting -> Wx::Html, Wx::Print; >>Wx::HtmlHelpController -> Wx::Help, Wx::Html). >> >But why? Why not have all classes at hand rightaway? Most classes are >already ready to be used by using Wx. Why not add the ones you listed here? Memory; I don't want to make Wx.dll even bigger than it is today. And at the time, I didn't think people would object to this... >>>Isn't it an idea to do a 'use Wx qw(:everything)' which preloads every >>>submodule that comes with the standard wxPerl distribution? Or even to >>>add another tag like 'use Wx qw(:allclasses)'? >>> >>I prefer the latter, if it is to be implemented. >> >I would certainly vote for this... Will look into implementing it. >>>I think it should be clear when which module should be loaded, or not to >>> >>I tink it is a simple matter of documentation; would it be visible enough >>if I added a "wxPerl notes" just below "wxPython notes"? >> >Yes, but I would prefer even more if you added an ':allclasses' tag to >be imported with Wx.pm :) Will do... BTW :everything will probably waste a lot of memory/startup time as well (probably more noticeable on low-end machines, but that's why we have Wx::Perl::SplashFast) Regards Mattia |
From: Mattia B. <mb...@ds...> - 2002-09-11 08:36:04
|
On Wed, 11 Sep 2002, Scott Lanning wrote: >I'm playing with XRC and ran into a couple problems. >I copied wxGTK/contrib/samples/xrc/rc/resource.xrc to >try to make it work with the following script (so far). >Below are resource.xrc (for reference) and the errors. Note, I don't have wxPerl here at the university, so I am guessing (good guesses, I hope...) >ERROR 1) Can't make a Bitmap. > >An error dialog pops up, related to <bitmap>filesave.gif</bitmap> >in the menubar, with this information: > > ! No handler found for image type. > - XRC resource: Cannot create bitmap from 'bitmap'. > >I'm not sure what it means. I also tried save.xpm. Either: 1 - call Wx::InitAllImageHandler 2 - Wx::Image::AddHandler( Wx::GIFImageHandler->new ) should work; 1 will work for sure, 2 should, but maybe I got the class/method names wrong. >ERROR 2) GetXRCID > >If I uncomment the EVT_MENU(... OnAbout) line, >on stderr, there is this message > > Usage: Wx::XmlResource::GetXRCID(str_id) at ./ex.pl line 30. > >It refers to > > $xr->GetXRCID('menu_about') > >What does it want for `str_id' (which XS says is type wxChar *). >In wxwindows, they do: XMLID("menu_about") . It is a static method, call it as: Wx::XmlResource::GetXRCID( "string" ) the complaint comes from the fact that $foo->M( 'bar' ) is calling M with two arguments ( $foo and 'bar' ); HTH Mattia |
From: Mattia B. <mb...@ds...> - 2002-09-11 08:29:01
|
On Wed, 11 Sep 2002, Jouke Visser wrote: >Hi, > >One thing that is beginning to increasingly annoy me is the fact that >it's not clear which modules should be loaded for specific Wx classes I >want to use. I'm doing a 'use Wx qw(:everything)' normally, and for >image-related classes I am supposed to do a 'use Wx::Image', for No >html-related classes, I am supposed to do a 'use Wx::Html' (even though >it's for the usage of 'Wx::HtmlWindow', not 'Wx::Html'). Wx::Html - anything related to wxHtml Wx::Help - anything related to the help system Wx::Print - anything related to printing Wx::FS - anything related to wxFileSystem Wx::Grid - anything related to wxGrid Wx::MDI - anything related to MDI Wx::STC - StyledTextControl Wx::XRC - XML resources Wx - you better do that first... In case some functionality crosses the boundary you need all related classes (e.g. Wx::HtmlEasyPrinting -> Wx::Html, Wx::Print; Wx::HtmlHelpController -> Wx::Help, Wx::Html). >Isn't it an idea to do a 'use Wx qw(:everything)' which preloads every >submodule that comes with the standard wxPerl distribution? Or even to >add another tag like 'use Wx qw(:allclasses)'? I prefer the latter, if it is to be implemented. >I think it should be clear when which module should be loaded, or not to I tink it is a simple matter of documentation; would it be visible enough if I added a "wxPerl notes" just below "wxPython notes"? >load specific modules at all. Regards Mattia |
From: Jouke V. <jo...@pv...> - 2002-09-11 08:28:47
|
Hi, I'm trying to get a piece of code to work, but every time it tries to call the constructor of the Wx::HtmlWindow, it segfaults under Linux. I'm using RedHat 7.2, kernel 2.4.7-10, with the wxPerl 0.11 rpm for wxgtk 2.3.3. The output of perl -d:Trace wxChat.pl ends with: >> /usr/lib/perl5/site_perl/5.6.1/i386-linux/Wx.pm:96: return 1; >> wxChat.pl:32: $self->{chattext} = Wx::HtmlWindow->new($self, -1, [-1,-1], [400,100]); Segmentation fault The same code runs on Windows XP (Activestate Perl build 633) with wxPerl 0.11 ppm for wxmsw 2.3.3 without any problem. I also ran the script with wxPerl 0.09 rpm for wxgtk 2.2.9, which gives exactly the same output as with 0.11. Any ideas? -------------------------------------------------------------------- | Jouke Visser | http://jouke.pvoice.org (personal) | | | http://www.pvoice.org (pVoice & pStory)| | Perl GUI Geek | http://wxperl.pvoice.org (wxPerl) | -------------------------------------------------------------------- |
From: Mattia B. <mb...@ds...> - 2002-09-11 08:12:58
|
On Tue, 10 Sep 2002, DH wrote: >What's up with Wx::TextAttr? It is implemented, but you need the version compiled against wxWIndows 2.3.3 (I guess you are using 2.2.9) >I took a look at TextCtrl.xs, and I saw plenty of code (see below for some), >and I also saw in typemap > >Wx_TextAttr * O_NON_WXOBJECT >wxTextAttr * O_NON_WXOBJECT >How much work, if any, is needed to get Wx::TextAttr up and running? >(it wouldn't be just a matter of switching O_NON_WXOBJECT to O_WXOBJECT or would it?) No, wxTextAttr is not derived from wxObject Regards Mattia |
From: DH <cra...@ya...> - 2002-09-11 07:47:59
|
I too dislike this. It's also a pain in the ass cause there is no pod in any of the modules, so you can't figure out by reading the pod that you have to use Wx::Html to get at Wx::HtmlWindow, you have to go diving in the sourcecode. If anything, Wx::Html ought to have pod saying that in order to use Wx::HtmlWindow, you have to use Wx::Html. If I had enough brains to do this, Wx::Whatever would be in its own file, complete with documentation --- Jouke Visser <jo...@pv...> wrote: > Hi, > > One thing that is beginning to increasingly annoy me is the fact that > it's not clear which modules should be loaded for specific Wx classes I > want to use. I'm doing a 'use Wx qw(:everything)' normally, and for > image-related classes I am supposed to do a 'use Wx::Image', for > html-related classes, I am supposed to do a 'use Wx::Html' (even though > it's for the usage of 'Wx::HtmlWindow', not 'Wx::Html'). > > Isn't it an idea to do a 'use Wx qw(:everything)' which preloads every > submodule that comes with the standard wxPerl distribution? Or even to > add another tag like 'use Wx qw(:allclasses)'? > > I think it should be clear when which module should be loaded, or not to > load specific modules at all. > > -- > ---------------------------------------------------------------------- > | Jouke Visser | http://jouke.pvoice.org (personal) | > | | http://www.pvoice.org (pVoice & pStory) | > | Perl GUI Geek | http://wxperl.pvoice.org (wxPerl) | > ---------------------------------------------------------------------- > > > > > > ------------------------------------------------------- > In remembrance > www.osdn.com/911/ > _______________________________________________ > wxperl-users mailing list > wxp...@li... > https://lists.sourceforge.net/lists/listinfo/wxperl-users __________________________________________________ Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost http://dir.remember.yahoo.com/tribute |
From: Scott L. <sla...@th...> - 2002-09-11 07:28:38
|
I'm playing with XRC and ran into a couple problems. I copied wxGTK/contrib/samples/xrc/rc/resource.xrc to try to make it work with the following script (so far). Below are resource.xrc (for reference) and the errors. #!/usr/bin/perl -w # Testing XRC use strict; MyApp->new()->MainLoop(); package MyApp; use base qw(Wx::App); use Wx qw(:everything); use Wx::XRC; use Wx::Event qw(EVT_MENU); sub OnInit { my $self = shift; my ($frame, $xr, $menubar); $frame = Wx::Frame->new( undef, -1, 'Test', wxDefaultPosition, wxSIZE(400,500) ); $frame->SetAutoLayout(1); $self->SetTopWindow($frame); $xr = Wx::XmlResource->new(); $xr->InitAllHandlers(); $xr->Load('./resource.xrc'); $menubar = $xr->LoadMenuBar('mainmenu'); $frame->SetMenuBar($menubar); # EVT_MENU($menubar, $xr->GetXRCID('menu_about'), \&OnAbout); $frame->Show(1); } sub OnAbout { my ($self, $event) = @_; wxMessageBox( 'The main text', 'About something', wxOK|wxICON_INFORMATION, $self ); } 1; __END__ <?xml version="1.0"?> <resource> <object class="wxMenuBar" name="mainmenu"> <style>wxMB_DOCKABLE</style> <object class="wxMenu" name="menu_file"> <label>$File</label> <style>wxMENU_TEAROFF</style> <object class="wxMenuItem" name="menu_about"> <label>$About...</label> <bitmap>filesave.gif</bitmap> </object> <object class="separator"/> <object class="wxMenuItem" name="menu_dlg1"> <label>Dialog 1</label> </object> <object class="wxMenuItem" name="menu_dlg2"> <label>Dialog 2</label> </object> <object class="separator"/> <object class="wxMenuItem" name="menu_quit"> <label>E$xit\tAlt-X</label> </object> </object> </object> <object class="wxToolBar" name="toolbar"> <style>wxTB_FLAT|wxTB_DOCKABLE</style> <margins>2,2</margins> <object class="tool" name="menu_open"> <bitmap>fileopen.gif</bitmap> <tooltip>Open catalog</tooltip> </object> <object class="tool" name="menu_save"> <bitmap>filesave.gif</bitmap> <tooltip>Save catalog</tooltip> </object> <object class="tool" name="menu_update"> <bitmap>update.gif</bitmap> <tooltip>Update catalog - synchronize it with sources</tooltip> </object> <separator/> <object class="tool" name="menu_quotes"> <bitmap>quotes.gif</bitmap> <toggle>1</toggle> <tooltip>Display quotes around the string?</tooltip> </object> <object class="separator"/> <object class="tool" name="menu_fuzzy"> <bitmap>fuzzy.gif</bitmap> <tooltip>Toggled if selected string is fuzzy translation</tooltip> <toggle>1</toggle> </object> </object> <object class="wxDialog" name="dlg1"> <object class="wxBoxSizer"> <object class="sizeritem"> <object class="wxBitmapButton"> <bitmap>fuzzy.gif</bitmap> <focus>fileopen.gif</focus> </object> </object> <object class="sizeritem"> <object class="wxPanel"> <object class="wxStaticText"> <label>fdgdfgdfgdfg</label> </object> <style>wxSUNKEN_BORDER</style> </object> <flag>wxALIGN_CENTER</flag> </object> <object class="sizeritem"> <object class="wxButton"> <label>Buttonek</label> </object> <border>10d</border> <flag>wxALL</flag> </object> <object class="sizeritem"> <object class="wxHtmlWindow"> <htmlcode><h1>Hi,</h1>man</htmlcode> <size>100,45d</size> </object> </object> <object class="sizeritem"> <object class="wxNotebook"> <object class="notebookpage"> <object class="wxPanel"> <object class="wxBoxSizer"> <object class="sizeritem"> <object class="wxHtmlWindow"> <htmlcode>Hello, we are inside a <u>NOTEBOOK</u>...</htmlcode> <size>50,50d</size> </object> <option>1</option> </object> </object> </object> <label>Page</label> </object> <object class="notebookpage"> <object class="wxPanel"> <object class="wxBoxSizer"> <object class="sizeritem"> <object class="wxHtmlWindow"> <htmlcode>Hello, we are inside a <u>NOTEBOOK</u>...</htmlcode> <size>50,50d</size> </object> </object> </object> </object> <label>Page 2</label> </object> <usenotebooksizer>1</usenotebooksizer> </object> <flag>wxEXPAND</flag> </object> <orient>wxVERTICAL</orient> </object> </object> <object class="wxDialog" name="dlg2"> <object class="wxBoxSizer"> <orient>wxVERTICAL</orient> <object class="sizeritem" name="dfgdfg"> <object class="wxTextCtrl"> <size>200,200d</size> <style>wxTE_MULTILINE|wxSUNKEN_BORDER</style> <value>Hello, this is an ordinary multiline\n textctrl....</value> </object> <option>1</option> <flag>wxEXPAND|wxALL</flag> <border>10</border> </object> <object class="sizeritem"> <object class="wxBoxSizer"> <object class="sizeritem"> <object class="wxButton" name="wxID_OK"> <label>Ok</label> <default>1</default> </object> </object> <object class="sizeritem"> <object class="wxButton" name="wxID_CANCEL"> <label>Cancel</label> </object> <border>10</border> <flag>wxLEFT</flag> </object> </object> <flag>wxLEFT|wxRIGHT|wxBOTTOM|wxALIGN_RIGHT</flag> <border>10</border> </object> </object> <title>Second testing dialog</title> </object> </resource> ERROR 1) Can't make a Bitmap. An error dialog pops up, related to <bitmap>filesave.gif</bitmap> in the menubar, with this information: ! No handler found for image type. - XRC resource: Cannot create bitmap from 'bitmap'. I'm not sure what it means. I also tried save.xpm. ERROR 2) GetXRCID If I uncomment the EVT_MENU(... OnAbout) line, on stderr, there is this message Usage: Wx::XmlResource::GetXRCID(str_id) at ./ex.pl line 30. It refers to $xr->GetXRCID('menu_about') What does it want for `str_id' (which XS says is type wxChar *). In wxwindows, they do: XMLID("menu_about") . And that's as far as I got so far. |
From: Jouke V. <jo...@pv...> - 2002-09-11 07:16:19
|
Hi, One thing that is beginning to increasingly annoy me is the fact that it's not clear which modules should be loaded for specific Wx classes I want to use. I'm doing a 'use Wx qw(:everything)' normally, and for image-related classes I am supposed to do a 'use Wx::Image', for html-related classes, I am supposed to do a 'use Wx::Html' (even though it's for the usage of 'Wx::HtmlWindow', not 'Wx::Html'). Isn't it an idea to do a 'use Wx qw(:everything)' which preloads every submodule that comes with the standard wxPerl distribution? Or even to add another tag like 'use Wx qw(:allclasses)'? I think it should be clear when which module should be loaded, or not to load specific modules at all. -- ---------------------------------------------------------------------- | Jouke Visser | http://jouke.pvoice.org (personal) | | | http://www.pvoice.org (pVoice & pStory) | | Perl GUI Geek | http://wxperl.pvoice.org (wxPerl) | ---------------------------------------------------------------------- |
From: Jouke V. <jo...@pv...> - 2002-09-11 07:10:46
|
The unoffical wxPerl documentation Graciliano put online does not have all wxPerl's classes listed. I'm wondering why. In particular I'm missing the wxHtmlWindow (and related) classes and the wxFileSystem (and related) classes. Is there a reason why they don't show up there? -- ---------------------------------------------------------------------- | Jouke Visser | http://jouke.pvoice.org (personal) | | | http://www.pvoice.org (pVoice & pStory) | | Perl GUI Geek | http://wxperl.pvoice.org (wxPerl) | ---------------------------------------------------------------------- |
From: Jouke V. <jo...@pv...> - 2002-09-11 07:08:08
|
I added some information to the Wiki (wxperl.pvoice.org) about wxFileSystemHandler. It's basically the code from Mattia's demo.pl, which does not seem to be documented anywhere in the wxWindows documentation... It's a very cool feature though. -- ---------------------------------------------------------------------- | Jouke Visser | http://jouke.pvoice.org (personal) | | | http://www.pvoice.org (pVoice & pStory) | | Perl GUI Geek | http://wxperl.pvoice.org (wxPerl) | ---------------------------------------------------------------------- |
From: Scott L. <sla...@th...> - 2002-09-11 06:36:38
|
On Tue, 10 Sep 2002, Everett, Toby wrote: > How about: > * Wx::NamedParameters > * Wx::NamedParams It also uses non-named params, like CGI.pm. > * Wx::LikeCGI > * Wx::AsCGI I think any name with substring CGI will be considered confusing. > * Wx::Compatability::CGI > * Wx::Compatability::Tk > * Wx::Compatability::Win32GUI Too long.. > We could even reuse a term from another arena: > * Wx::Thunk::CGI > * Wx::Thunk::Tk I didn't find any Thunk on CPAN, but it is in the Hacker's Dictionary. I think it's a clever idea, but probably still confusing due to "CGI". I think the objection is that putting CGI in the name will imply that it is somehow related to CGI web programming, not CGI.pm (which anyway is itself related to CGI web programming). I considered - Wx::Simple, but it's not really that simple (c.f. LWP::Simple, XML::Simple). - Wx::Abstract, but it's not abstract (c.f. DBI) - Wx::WidgetMaker suggested by Matt. There was an objection by Jouke that "widget" is not a wxwindows term. I don't consider that a defeating argument because CGI.pm is also unrelated to wxwindows. :) Also "widget" is a common/generic term. Also, Maker has precedence in GraphMaker, IndexMaker, MethodMaker, SquareMaker, Class::Maker, Slay::Maker (d'oh..). And I think it's not really appropriate to call it simply Wx::Widget. Also, I had already changed it to that name, so it's convenient. Okay, I upload now. |
From: <no...@so...> - 2002-09-11 04:23:37
|
Feature Requests item #607646, was opened at 2002-09-10 21:23 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365655&aid=607646&group_id=15655 Category: None Group: None Status: Open Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Featur Request: wxVidCap Initial Comment: Now that would be sweet http://www.lehigh.edu/~jrl1/wxwindows/ http://www.lehigh.edu/~jrl1/wxwindows/wxvidcap/wxvidca p.png ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365655&aid=607646&group_id=15655 |
From: DH <cra...@ya...> - 2002-09-11 03:58:04
|
What's up with Wx::TextAttr? I took a look at TextCtrl.xs, and I saw plenty of code (see below for some), and I also saw in typemap Wx_TextAttr * O_NON_WXOBJECT wxTextAttr * O_NON_WXOBJECT So my question is what's up? How much work, if any, is needed to get Wx::TextAttr up and running? (it wouldn't be just a matter of switching O_NON_WXOBJECT to O_WXOBJECT or would it?) The scintilla thing is cool, but this is native :) MODULE=Wx PACKAGE=Wx::TextAttr Wx_TextAttr* Wx_TextAttr::new( colText = wxNullColour, colBack = wxNullColour, font = (Wx_Font*)&wxNullFont ) Wx_Colour colText Wx_Colour colBack Wx_Font* font CODE: if( items == 1 ) RETVAL = new wxTextAttr(); else RETVAL = new wxTextAttr( colText, colBack, *font ); OUTPUT: RETVAL void Wx_TextAttr::DESTROY() Wx_Colour* Wx_TextAttr::GetBackgroundColour() CODE: RETVAL = new wxColour( THIS->GetBackgroundColour() ); OUTPUT: RETVAL Wx_Font* Wx_TextAttr::GetFont() CODE: RETVAL = new wxFont( THIS->GetFont() ); OUTPUT: RETVAL Wx_Colour* Wx_TextAttr::GetTextColour() CODE: RETVAL = new wxColour( THIS->GetTextColour() ); OUTPUT: RETVAL bool Wx_TextAttr::HasBackgroundColour() bool Wx_TextAttr::HasFont() bool Wx_TextAttr::HasTextColour() bool Wx_TextAttr::IsDefault() __________________________________________________ Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost http://dir.remember.yahoo.com/tribute |
From: <no...@so...> - 2002-09-11 02:15:27
|
Feature Requests item #607615, was opened at 2002-09-10 19:15 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365655&aid=607615&group_id=15655 Category: None Group: None Status: Open Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: when is WxTextAttr gonna be implemented? Initial Comment: I need style. I need rainbow colored text. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=365655&aid=607615&group_id=15655 |
From: David K. <da...@po...> - 2002-09-10 20:17:56
|
the module is a nice idea. but i agree with the others that "CGI" doesn't belong in the name anywhere. what the module does is introduce a new coding style to Wx, emulating the coding style of CGI.pm, but this style has also been incorporated into other modules, CGI::Application and HTML::Template to name just two. Everett, Toby <TEv...@AL...> wrote: > How about: > * Wx::NamedParameters > * Wx::NamedParams i like both of these. i like NamedParams a bit better but I know that the namespace maintainers prefer to avoid abbreviated words like "params", so my vote would have to go to Wx::NamedParameters. > * Wx::LikeCGI > * Wx::AsCGI > > Or we could define a whole namespace (anyone want to write a Tk > layer:). > * Wx::Compatability::CGI > * Wx::Compatability::Tk > * Wx::Compatability::Win32GUI again, Wx, even using your module is still not "compatible" with any of those technolgies. are you writing "syntax flavor" modules that emulate Tk and Win32::GUI as well?? maybe: Wx::SyntaxStyle::CGI? or Wx::CodeFlavor::CGI would be more descriptive? :-) <-these-> :-) mean that i am :-) <-Just Kidding-> :-) --dave |
From: Mattia B. <mb...@ds...> - 2002-09-10 20:03:49
|
> > -----Original Message----- > > From: Mattia Barbon > > Sent: 07 September 2002 21:18 > > To: David Kaufman > > Cc: wxp...@li... > > Subject: Re: [wxperl-users] example of loading icons without > > .ico file? > > > > > can someone point me to an example of loading icons from an > > > .icl file, .dll or other (windows) icon resource? i'd > > > like to package up my icons (into a .dll preferably) and > > > ship this with my app instead of a bunch of scattered .ico > > > files > > I don't think this is possible. > > wxImage lets you specify an index in the constructor for files that support Works only for wxWindows 2.3.3 > multiple images (ICO, GIF, TIFF). Perhaps there's a way to load the image > and pass the wxImage to the wxIcon object somehow? Possible; I have not tried it, though; you need to do Image -> Bitmap -> Icon, IIRC. Regards Mattia |
From: Mattia B. <mb...@ds...> - 2002-09-10 20:03:46
|
> It seems that wxTE_AUTO_URL is not exported automatically when I 'use Wx > qw(:everything)' Correct; it will be in the next release; the value for the constant is 0x1000 Regards Mattia |
From: Mattia B. <mb...@ds...> - 2002-09-10 19:40:24
|
> -----Original Message----- > From: Mattia Barbon [mailto:mb...@ds...] > Sent: Saturday, September 07, 2002 12:18 PM > To: Everett, Toby > Cc: wxp...@li... > Subject: RE: [wxperl-users] Wx::ComboBox::SetValue ineffective when > wxCB_R EADONLY is set > > > > interactively, the value in $myvar changes. I'm not quite sure how it's > > > done internally. A widget->variable equivalent can be done like so: > > It uses magic (really! magic is used internally by perl to implement, > > among other things, tied variables, %ENV, lvalue subroutines, like > > pos() and substr(), ...). > I know of magic, just never messed around with the Perl internals (the ^^^^^ ^^^^^^^^^^^^^^ That's good, you gained a lot of mind-sanity this way... > closest I've gotten is writing a few dinky little XSUBs to speed string > manipulation for splitting stereo WAV files into mono ones and vice-versa). > I also found out that magic doesn't work perfectly when it comes to doing > slice manipulations on @ISA (Sarathy confirmed when I explained what I was > doing - he laughed and said I shouldn't do things like that to magic > variables:). > > > > Note that the calling syntax is Wx::TiedVariable::Set($widget, $$ref). > This > > > is intentional, because it would allow Set to be hooked into the Wx:: > > > hierarchy at the right point using something akin to > > > *Wx::RightHierarchyPoint::SetTiedVariable = \&Wx::TiedVariable::Set; > Then > > > you could just use $widget->SetTiedVariable(\$value); I just didn't > know at > > > what point in the hierarchy GetValue and SetValue became active. > > They are just for TextCtrl (well, and some other control has them, too); > Wx::ComboBox as well:) > > > it is probably easier to have an arbitrary method (say, FooBar), > implemented > > differently for each control, and use this method; > > e.g. > > *Ctrl1::Foobar = sub { one impl } > > *Ctrl2::FooBar = sub { other impl } > > And Wx::TiedVariable::Set calls FooBar instead of SetValue. > That makes sense. In the case of TextCtrl, you can even do > *Wx::TextCtrl::Foobar = \&Wx::TextCtrl::SetValue > right? I think so; it is probably better to name the method in some improbable way (say: Wx::TextCtrl::VarWatcher_FooBar ^^^^^^^^^^ Assuming your module is called VarWatcher > So should Wx::TiedVariable attach itself to Wx::Control? Do you want me to > write a prototype implementation, or given that the problem is so simple, > would you feel more comfortable writing it so that the code look and feel > matches the rest of wxPerl more closely? I don't know if this module belongs to wxPerl (I'm inclined to say not, I can be convinced otherwhise) I think it belongs to CPAN as an external module. Since you are interested in it, it is probably better if you write it. Regards Mattia |