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: Everett, T. <TEv...@AL...> - 2002-09-10 18:15:35
|
How about: * Wx::NamedParameters * Wx::NamedParams * 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 etc:) We could even reuse a term from another arena: * Wx::Thunk::CGI * Wx::Thunk::Tk --Toby Everett |
From: Jouke V. <jo...@pv...> - 2002-09-10 18:01:25
|
It seems that wxTE_AUTO_URL is not exported automatically when I 'use Wx qw(:everything)' Am I right? Jouke |
From: Simon F. <sim...@bb...> - 2002-09-10 16:34:38
|
Hi Mattia, I'm just testing the document/view framework with the latest build in CVS so I can send you an up-to-date diff, but it won't compile at the moment because Wx.xs is including "cpp/ovl_const.cpp" which isn't in CVS. I understand that the head revision in CVS isn't guaranteed to compile, so should I send you a diff on v0.11 or just send you the few short snippets that need to go in typemap and cpp/typedef.h? By the way where in the XS is the replacement for lib/Wx/_Inheritance.pm ? Thanks 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: Simon F. <sim...@bb...> - 2002-09-10 11:35:20
|
> -----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 multiple images (ICO, GIF, TIFF). Perhaps there's a way to load the image and pass the wxImage to the wxIcon object somehow? I've not looked into this seriously, I'm just looking at the docs while wx233 compiles and came across it. 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: Scott L. <sla...@th...> - 2002-09-10 09:39:26
|
I found that Wx::Window::DestroyChildren is unwrapped. Maybe there is a technical reason? In any case, it's not necessary for me, just something I came across and was curious. Here is a minimal script to show it: #!/usr/bin/perl -w MyApp->new()->MainLoop(); package MyApp; use base qw(Wx::App); use strict; use Wx qw(:everything); sub OnInit { my $self = shift; my ($frame, $pagesizer); $frame = Wx::Frame->new(undef, -1, '', wxDefaultPosition, wxSIZE(300,200)); $self->SetTopWindow($frame); $frame->SetAutoLayout(1); $frame->Show(1); $pagesizer = Wx::BoxSizer->new(wxVERTICAL); $pagesizer->Add(Wx::Button->new($frame, -1, "BLAH")); $frame->SetSizer($pagesizer); $pagesizer->SetSizeHints($frame); $frame->DestroyChildren(); return 1; } 1; I tried adding a simple entry to Window.xs, --- Window.xs.~1.36.~ Thu Sep 5 16:37:51 2002 +++ Window.xs Tue Sep 10 00:48:19 2002 @@ -201,6 +201,9 @@ bool Wx_Window::Destroy() +void +Wx_Window::DestroyChildren() + #if defined( __WXMSW__ ) || defined( __WXPERL_FORCE__ ) void then make, make install. However, DestroyChildren segfaults. Here is the resulting output to Window.c: XS(XS_Wx__Window_DestroyChildren) { dXSARGS; if (items != 1) Perl_croak(aTHX_ "Usage: Wx::Window::DestroyChildren(THIS)"); { Wx_Window * THIS; THIS = (Wx_Window *) wxPli_sv_2_object( aTHX_ ST(0), wxPlWindowName );; THIS->DestroyChildren(); } XSRETURN_EMPTY; } Should it instead look like wxwindows source, src/common/wincmn.cpp ? (I mean should Window.xs to explicitly delete the children and not let wxwindows to it) bool wxWindowBase::DestroyChildren() { wxWindowList::Node *node; for ( ;; ) { // we iterate until the list becomes empty node = GetChildren().GetFirst(); if ( !node ) break; wxWindow *child = node->GetData(); wxASSERT_MSG( child, wxT("children list contains empty nodes") ); child->Show(FALSE); delete child; wxASSERT_MSG( !GetChildren().Find(child), wxT("child didn't remove itself using RemoveChild()") ); } return TRUE; } Maybe the child is deleted "from underneath" of wxPerl. |
From: Scott L. <sla...@th...> - 2002-09-10 08:59:21
|
On Tue, 10 Sep 2002, Jouke Visser wrote: > > Anything with CGI in its name would be way too confusing. Call it > > something like Wx::WidgetMaker. > > > > Matt. > > I agree completely. Don't know if WidgetMaker is the right word though > (Widget is not a WxWindows term...), but I agree that CGI is confusing... Well, I uploaded as Wx::Widgets::CGI, then read Matt's message, went through and changed everything to Wx::WidgetMaker, came back and now it's possibly a bad name. So.. for now, it is uploaded to PAUSE as Wx::Widgets::CGI, and when a better name than Wx::WidgetMaker is decided, I'll delete the uploaded file, upload the new one, and register the namespace. It's my first CPAN module, so I'm not sure when/if it gets put from PAUSE to a "public" place. On PAUSE my directory is https://pause.perl.org/pub/PAUSE/authors/id/S/SL/SLANNING/ On CPAN, http://search.cpan.org/author/SLANNING/ |
From: Jouke V. <jo...@pv...> - 2002-09-10 08:05:13
|
> Anything with CGI in its name would be way too confusing. Call it > something like Wx::WidgetMaker. > > Matt. I agree completely. Don't know if WidgetMaker is the right word though (Widget is not a WxWindows term...), but I agree that CGI is confusing... -- ---------------------------------------------------------------------- | Jouke Visser | http://jouke.pvoice.org (personal) | | | http://www.pvoice.org (pVoice & pStory) | | Perl GUI Geek | http://wxperl.pvoice.org (wxPerl) | ---------------------------------------------------------------------- |
From: Matt S. <ma...@se...> - 2002-09-10 06:29:22
|
On Tuesday, September 10, 2002, at 04:04 am, DH wrote: > Just slap it up on cpan, as i'm eager to try it out. > I do have objection to the name, > as it has nothing to do with CGI directly, > so it wouldn't be a good suggestion. > > Maybe Wx::Widget::CGI would be less confusing? Anything with CGI in its name would be way too confusing. Call it something like Wx::WidgetMaker. Matt. |
From: Jouke V. <jo...@pv...> - 2002-09-10 05:43:37
|
Hi Graciliano, That's exactly what I did. I downloaded the new wxPerl binaries, copied them over the existing files and then tried to run, to no avail, with the same errors... Any other ideas? Jouke Graciliano M. P. (Virtua Sites) wrote: >>I've downloaded Wx::ActiveX::IE's ppm package for perl 5.6.1 (I'm using >>Activestate Perl build 633), but all I'm getting is this error: >> >><snip> > > >>Any ideas? >> >>Jouke > > > The problem is that you are using wxAtiveX without wxPerl compiled with > wxWindows2.3.3. In the announcement of Wx::ActiveX > (http://wxperl.virtuasites.com.br/wxactivex.htm) you will se that: > > *** NOTE *** > This binarys are for wxPerl-0.11, compiled with MSVC++ and wxWindows 2.3.3 > If you haven't this version of wxPerl you can get it and install manually > from: > (They alredy have wxActiveX inside) > Perl 5.6.1: > http://wxperl.virtuasites.com.br/wxPerl-5.6.1-Win32-wx233-blib.zip (1.6M) > Perl 5.8.0: > http://wxperl.virtuasites.com.br/wxPerl-5.8.0-Win32-wx233-blib.zip (1.7M) > ************ > To install manually the blib: > * uncompress wxPerl-5.x.x-Win32-wx233-blib.zip > * go to ./blib/lib and copy every thing to > path/to/perl/site/lib > * go to ./blib/arch and copy every thing to > path/to/perl/site/lib > > ************ > > Just follow the notes. You will need to remove wxPerl, or the ./blib files > will overwrite them, since you are getting again wxPerl binarys. > > I holp that I help you. If this doesn't work just ask for help again in the > list. > > Graciliano M. P. > > > > > ------------------------------------------------------- > 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: DH <cra...@ya...> - 2002-09-10 03:04:51
|
Just slap it up on cpan, as i'm eager to try it out. I do have objection to the name, as it has nothing to do with CGI directly, so it wouldn't be a good suggestion. Maybe Wx::Widget::CGI would be less confusing? --- Scott Lanning <sla...@th...> wrote: > I mentioned in passing that I made a library last week > to allow making wPerl widgets using CGI.pm-like interface. > Now I'd like to put it on CPAN unless there is some objection. > Also, is it an okay name? > > Example usage: > > $q = Wx::CGI->new(-parent => $self); > > $pagesizer = Wx::BoxSizer->new(wxVERTICAL); > > $q->print($q->h1('H1 text'), $pagesizer); > > $rowsizer = Wx::BoxSizer->new(wxHORIZONTAL); > > $control = $q->textfield( > -name => 'color_textfield', > -default => 'blue', > -size => 50, # window width, not number of chars > -maxlength => 30, > ); > > $q->print([$q->print('Textfield: '), $control], $rowsizer); > $pagesizer->Add($rowsizer); > > ... > > foreach my $param ($q->param()) { > print "$param: ", $q->param($param), $/; > } > > Also popup_menu, scrolling_list, radio_group, some others. > > > > ------------------------------------------------------- > 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 __________________________________________________ Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost http://dir.remember.yahoo.com/tribute |
From: Graciliano M. P. \(V. Sites\) <gm...@vi...> - 2002-09-10 01:31:45
|
> I've downloaded Wx::ActiveX::IE's ppm package for perl 5.6.1 (I'm using > Activestate Perl build 633), but all I'm getting is this error: > > <snip> > Any ideas? > > Jouke The problem is that you are using wxAtiveX without wxPerl compiled with wxWindows2.3.3. In the announcement of Wx::ActiveX (http://wxperl.virtuasites.com.br/wxactivex.htm) you will se that: *** NOTE *** This binarys are for wxPerl-0.11, compiled with MSVC++ and wxWindows 2.3.3 If you haven't this version of wxPerl you can get it and install manually from: (They alredy have wxActiveX inside) Perl 5.6.1: http://wxperl.virtuasites.com.br/wxPerl-5.6.1-Win32-wx233-blib.zip (1.6M) Perl 5.8.0: http://wxperl.virtuasites.com.br/wxPerl-5.8.0-Win32-wx233-blib.zip (1.7M) ************ To install manually the blib: * uncompress wxPerl-5.x.x-Win32-wx233-blib.zip * go to ./blib/lib and copy every thing to path/to/perl/site/lib * go to ./blib/arch and copy every thing to path/to/perl/site/lib ************ Just follow the notes. You will need to remove wxPerl, or the ./blib files will overwrite them, since you are getting again wxPerl binarys. I holp that I help you. If this doesn't work just ask for help again in the list. Graciliano M. P. |
From: Everett, T. <TEv...@AL...> - 2002-09-09 20:19:57
|
-----Original Message----- From: Scott Lanning [mailto:sla...@th...] Sent: Saturday, September 07, 2002 10:42 AM To: Mattia Barbon Cc: wxp...@li... Subject: Re: [wxperl-users] Behaviour change for 0.15 > So this means that $class->SUPER::new() returns HASH > while Wx::Button->new() returns SCALAR? For what it's > worth, I think that's quite a nice behavior. :) Ooooooh:) I missed that. I rescind all previous suggestions on the subject if what Mattia is proposing is to make this behavior the same for all built-in classes. That's quite clever. <insert appropriate bowing and scraping on my part> :-) --Toby Everett |
From: Everett, T. <TEv...@AL...> - 2002-09-09 20:15:12
|
-----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 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? 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? --Toby Everett |
From: Jouke V. <jo...@pv...> - 2002-09-09 19:18:15
|
Hi, I've downloaded Wx::ActiveX::IE's ppm package for perl 5.6.1 (I'm using Activestate Perl build 633), but all I'm getting is this error: The procedure entry point ?DoScreenToClient@wxWindow@@MBEXPAH0@Z could not be located in the dynamic link library wxmsw233.dll in a popup window and : Can't load 'c:/Perl/site/lib/auto/Wx/ActiveX/ActiveX.dll' for module Wx::ActiveX : load_file:The specified procedure could not be found at c:/Perl/lib/DynaLoader .pm line 206. Compilation failed in require at html.pl line 6. BEGIN failed--compilation aborted at html.pl line 6. afterwards. Any ideas? Jouke |
From: Simon F. <sim...@bb...> - 2002-09-09 10:20:46
|
> I've written some code you can cut and paste to create a recent files > menu. There are also two snippets on how to use the Tip provider. Great! By the way, if you use the document/view framework you'll be able to get a File History menu with this code: $docmanager->FileHistoryUseMenu( $file_menu ); This isn't available yet, I still have a little bit of work to do on it. But I'll be sending it to Mattia this afternoon or tomorrow. Simon - - -- ---- ---------------------------- --- -- - - Simon Flack Software Engineer BBC, Interactive F&L email: sim...@bb... telephone: 020 8752 6436 - - -- ---- ----------------------------------- --- -- - - > -----Original Message----- > From: Marcus [mailto:li...@wo...] > Sent: 08 September 2002 03:43 > To: wxp...@li... > Subject: [wxperl-users] Recipe: Recent Files Menu, Show Tips > > > I've written some code you can cut and paste to create a recent files > menu. There are also two snippets on how to use the Tip provider. > > They are on the wxPerl Cookbook page I set up a while ago: > > http://scripts.wordit.com/cgi-bin/wxperl/logbook.pl?file=3 > > This is just meant for cut and paste type snippets. You can add your > own recipes, and leave comments. It's totally simple to use. > > Marcus > > > > > ------------------------------------------------------- > 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 > 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: Scott L. <sla...@th...> - 2002-09-09 06:40:29
|
I mentioned in passing that I made a library last week to allow making wPerl widgets using CGI.pm-like interface. Now I'd like to put it on CPAN unless there is some objection. Also, is it an okay name? Example usage: $q = Wx::CGI->new(-parent => $self); $pagesizer = Wx::BoxSizer->new(wxVERTICAL); $q->print($q->h1('H1 text'), $pagesizer); $rowsizer = Wx::BoxSizer->new(wxHORIZONTAL); $control = $q->textfield( -name => 'color_textfield', -default => 'blue', -size => 50, # window width, not number of chars -maxlength => 30, ); $q->print([$q->print('Textfield: '), $control], $rowsizer); $pagesizer->Add($rowsizer); ... foreach my $param ($q->param()) { print "$param: ", $q->param($param), $/; } Also popup_menu, scrolling_list, radio_group, some others. |
From: Marcus <li...@wo...> - 2002-09-08 02:42:44
|
I've written some code you can cut and paste to create a recent files menu. There are also two snippets on how to use the Tip provider. They are on the wxPerl Cookbook page I set up a while ago: http://scripts.wordit.com/cgi-bin/wxperl/logbook.pl?file=3 This is just meant for cut and paste type snippets. You can add your own recipes, and leave comments. It's totally simple to use. Marcus |
From: Scott L. <sla...@th...> - 2002-09-07 20:52:45
|
I tried to compile CVS source from scratch, but get an error. The wxwindows is latest development snapshot, 2.3.2, and appears to have compiled with no error. Also, I went into contrib/src and compiled xrc and stc. Back to wxperl, `perl Makefile.PL --disable-stc --debug` (I tried stc, but it bombed too, thus --disable-stc), and it looks fine. Then `make` goes without errors until: c++ -c -I. -I/usr/local/lib/wx/include/gtk-2.3 -I/usr/local/include \ -g -fno-rtti -fno-exceptions -DVERSION=\"0.12\" -DXS_VERSION=\"0.12\" \ -fPIC -I/usr/lib/perl5/5.6.1/i386-linux/CORE -DGTK_NO_CHECK_CASTS \ -D__WXGTK__ -D_REENTRANT Frames.c Frames.c: In function `void XS_Wx__Wizard_newFull (CV *)': Frames.c:163: cannot call member function `wxWizard::Create (wxWindow *, int, const wxString &, const wxBitmap &, const wxPoint &)' without object make: *** [Frames.o] Error 1 Hm, what's wrong? Am I compiling the wrong versions? |
From: Mattia B. <mb...@ds...> - 2002-09-07 20:19:11
|
> hi all, > > 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. > i'm currently doing: > > use Wx qw(wxBITMAP_TYPE_ICO); > > followed by > > $frame->SetIcon(Wx::Icon->new('my/file.ico', wxBITMAP_TYPE_ICO)); > > but the wxWindows docs seem to suggest (tho i'm not that good at > translating the C documentation to perl in my head...) that there is > also a wxBITMAP_TYPE_ICO_RESOURCE constant which could be passed to > LoadIcon to have it read an .icl or .dll (or .exe? what else exactly > *is* an icon resource?) but when i tried changing the above to: > > use Wx qw(wxBITMAP_TYPE_ICO_RESOURCE); > ^^^^^^^^^ > $frame->SetIcon(Wx::Icon->new('icons.icl', wxBITMAP_TYPE_ICO_RESOURCE, > 1)); > # tried this with and w/out this "index" parameter ^^^ > > the call does not die, but fails silently, loading no icon from the > file. This won't work, _ICO_RESOURCE will try to load the file from Wx.dll. Regards Mattia |
From: Mattia B. <mb...@ds...> - 2002-09-07 20:18:48
|
> -----Original Message----- > From: Mattia Barbon [mailto:mb...@ds...] > Sent: Friday, September 06, 2002 8:38 AM > To: Everett, Toby > Cc: wxp...@li... > Subject: Re: [wxperl-users] Wx::ComboBox::SetValue ineffective when > wxCB_READONLY is set > > > If this is under wxMSW, it is a known bug; I can reproduce it > > with CVS wxWindows 2.3.3 under Windows; wxGTK (and I assume wxMOTIF), > > seem to work fine. I am going to commit a fix for this in wxWindows; > > this should be in 2.3.3 release. > MSW = Microsoft Windows, right? BTW, where is the best place to search for Yes > known bugs? wxPerl bug tracker, wxWindows bug tracker; in this case this one was not in the tracker (was discussed < 2 weeks ago on wx-...@li...) > > > way through the darkness, but I'm making reasonably good progress in > doing > > > my first test port of a Tk app. There are definitely some Tk things I > miss > > > (-textvariable, for one:), but I will say the native look and feel is > > ^^^^^^^^^^^^^ > > Curious: what does it do? > It hooks a variable to the value of a widget. You pass it a reference to a > scalar, like so: > <create_new_widget> . . . -textvariable => \$myvar . . . > Then, whenever you update $myvar, the value in the equivalent of a TextCtrl > or whatever changes. Similarly, when you change the value in the widget OK, it is what I thought it was. > 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(), ...). <snip> > 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); 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. Regards Mattia |
From: Mattia B. <mb...@ds...> - 2002-09-07 20:18:42
|
> -----Original Message----- > From: Mattia Barbon [mailto:mb...@ds...] > Sent: Friday, September 06, 2002 8:38 AM > To: wxp...@li... > Subject: [wxperl-users] Behaviour change for 0.15 > > > I'd like to deprecate that feature and have > > Wx::Button->new( ... ) return a scalar reference, > > while MyButton->new( ... ) will still return an > > hash refernce; this will help saving some memory, > > and is something that I wanted to do since some time, > > but I always got more important things to do... > > *raises hand* This makes sense to me, but seeing as the other discussion > going on at this moment is about SCALAR refs vs. HASH refs, might I posit a > recommendation? What if there were AsHash and AsScalar calls? The two of > them would be used to force a ref of a given type to the other type. Things > would have defaults (as described in the rest of your stuff), but users > could always do things like: > > my $b = Wx::Button->new( ... )->AsHash; > $b->{foo} = 1; $b->{BAR} = 2; > > That would let people override the defaults on a per instance basis. I'm > guessing there would be little use for the AsScalar call, but somebody might > find it useful sometime:). The AsHash call would do all of your normal hash > tracking stuff. Also, FindWindow might have alternate variants > FindWindowAsHash and FindWindowAsScalar that would do the right thing > without the additional overheard of building the object and converting it. > > Is this doable? Does it make any sense? It might reduce all these Unfortunately I don't think it is doable... > arguments between people who want things one way or the other. Regards Mattia |
From: Scott L. <sla...@th...> - 2002-09-07 18:42:00
|
On Fri, 6 Sep 2002, Mattia Barbon wrote: > Until now calling Wx::Button->new and MyButton->new > returned an HASH refence, so it was possible to use code like this: > > my $b = Wx::Button->new( ... ); > $b->{foo} = 1; $b->{BAR} = 2; > ... > > I'd like to deprecate that feature and have > Wx::Button->new( ... ) return a scalar reference, > while MyButton->new( ... ) will still return an > hash refernce; So this means that $class->SUPER::new() returns HASH while Wx::Button->new() returns SCALAR? For what it's worth, I think that's quite a nice behavior. :) |
From: Scott L. <sla...@th...> - 2002-09-07 18:32:52
|
On Fri, 6 Sep 2002, Mattia Barbon wrote: > Scott Lanning wrote: > > Frame for its parent and I end up doing things like this from > > the MenuBar subclass > > > > no strict 'refs'; > > EVT_MENU($parent, '...', \&{ref($parent) . 'OnMenuDialog'}); > $parent->can( 'OnMenuDialog' ) looks cleaner to me, BTW I didn't know `can' returns the CODE ref. Thanks! > the wxPliClassInfo object to locate the m_self memeber, get the > hashref stored here, and return it. If that fails, it uses > sv_setref_pv to create a new SCALAR reference and returns it. Thanks for the explanation. Hopefully I get more familiar with it and can help making some wrapper. > If you post a list of classes that you need to be HASH-ified, > I think I could do that for 0.12 . I was thinking just in terms of making the library better in general; I would feel selfish to request these things for myself. If you don't care either way, then: Wx::MenuBar, Wx::SingleChoiceDialog, Wx::TextEntryDialog; but these are only ones that I stumbled across so far as I learn the library. I'm still learning wxPerl and might not be using the correct approach. Even now I might change my mind to a different approach; for example, I just found XRC which looks very nice, and maybe then I am less likely to subclass these objects. In my mind, _all_ classes that can be subclassed should ideally be hashes, but I only mean it to be an idea to consider. |
From: David K. <da...@po...> - 2002-09-07 02:18:23
|
hi all, 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'm currently doing: use Wx qw(wxBITMAP_TYPE_ICO); followed by $frame->SetIcon(Wx::Icon->new('my/file.ico', wxBITMAP_TYPE_ICO)); but the wxWindows docs seem to suggest (tho i'm not that good at translating the C documentation to perl in my head...) that there is also a wxBITMAP_TYPE_ICO_RESOURCE constant which could be passed to LoadIcon to have it read an .icl or .dll (or .exe? what else exactly *is* an icon resource?) but when i tried changing the above to: use Wx qw(wxBITMAP_TYPE_ICO_RESOURCE); ^^^^^^^^^ $frame->SetIcon(Wx::Icon->new('icons.icl', wxBITMAP_TYPE_ICO_RESOURCE, 1)); # tried this with and w/out this "index" parameter ^^^ the call does not die, but fails silently, loading no icon from the file. thanks in advance, -dave |
From: Everett, T. <TEv...@AL...> - 2002-09-06 19:25:14
|
-----Original Message----- From: Mattia Barbon [mailto:mb...@ds...] Sent: Friday, September 06, 2002 8:38 AM To: wxp...@li... Subject: [wxperl-users] Behaviour change for 0.15 > I'd like to deprecate that feature and have > Wx::Button->new( ... ) return a scalar reference, > while MyButton->new( ... ) will still return an > hash refernce; this will help saving some memory, > and is something that I wanted to do since some time, > but I always got more important things to do... *raises hand* This makes sense to me, but seeing as the other discussion going on at this moment is about SCALAR refs vs. HASH refs, might I posit a recommendation? What if there were AsHash and AsScalar calls? The two of them would be used to force a ref of a given type to the other type. Things would have defaults (as described in the rest of your stuff), but users could always do things like: my $b = Wx::Button->new( ... )->AsHash; $b->{foo} = 1; $b->{BAR} = 2; That would let people override the defaults on a per instance basis. I'm guessing there would be little use for the AsScalar call, but somebody might find it useful sometime:). The AsHash call would do all of your normal hash tracking stuff. Also, FindWindow might have alternate variants FindWindowAsHash and FindWindowAsScalar that would do the right thing without the additional overheard of building the object and converting it. Is this doable? Does it make any sense? It might reduce all these arguments between people who want things one way or the other. --Toby Everett |