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 |