[wxperl-users] Building wxPerl with wxWindows 2.3.1, and using XML resources

Hi All,
I'm new to wxPerl and wxWindows, (but not to Perl...), and am a bit
confused about a couple of things...

I want to use XML resource files with wxPerl, and understand that this
is only available with the 'unstable' 2.3.1 version of wxWindows.  I've
downloaded and built this with no problems, into c:\wx2.3.1\wx23_1.dll.

Three questions:

1. How do I rebuild wxPerl to use this version of wxWindows? =20

I've tried editing build\nmake.mak to change WXWIN to c:\wx2.3.1, and
rebuilding the makefile for wxPerl and remaking, but I get the errors:

Controls.c(4498) : error C2039: 'SetString' : is not a member of
'wxRadioBox'
        c:\wx2.3.1\include\wx/msw/radiobox.h(25) : see declaration of
'wxRadioBox'
XS/RadioBox.xs(95) : error C2039: 'SetString' : is not a member of
'wxRadioBox'
        c:\wx2.3.1\include\wx/msw/radiobox.h(25) : see declaration of
'wxRadioBox'
NMAKE : fatal error U1077: 'cl' : return code '0x2'

2. Given that I get things going with wxWindows 2.3.1, can someone give
me (or point me to) an overview of how to use XML-based resource files
in wxPerl?

3. Is there a  GUI designer available which will create resource files?
I've looked at wxDesigner - is there another one included with
wxWindows?

Thanks,

James Lavery

0
james (30)
1/23/2014 1:01:01 AM
perl.wxperl.users 3070 articles. 0 followers. Follow

1 Replies
362 Views

Similar Articles

[PageSpeed] 5

On Mon, 5 Nov 2001, James Lavery wrote:

>Hi All,
>I'm new to wxPerl and wxWindows, (but not to Perl...), and am a bit
>confused about a couple of things...
>
>I want to use XML resource files with wxPerl, and understand that this
>is only available with the 'unstable' 2.3.1 version of wxWindows.  I've
>downloaded and built this with no problems, into c:\wx2.3.1\wx23_1.dll.
>
>Three questions:
>
>1. How do I rebuild wxPerl to use this version of wxWindows?
>
>I've tried editing build\nmake.mak to change WXWIN to c:\wx2.3.1, and
I just do:
set WXDIR=c:\wx
set WXWIN=%WXDIR%
set PATH=%WXDIR%\lib

in a small batch file ( no need to modify build/* )

>rebuilding the makefile for wxPerl and remaking, but I get the errors:

>Controls.c(4498) : error C2039: 'SetString' : is not a member of
>'wxRadioBox'
>        c:\wx2.3.1\include\wx/msw/radiobox.h(25) : see declaration of
>'wxRadioBox'
>XS/RadioBox.xs(95) : error C2039: 'SetString' : is not a member of
>'wxRadioBox'
>        c:\wx2.3.1\include\wx/msw/radiobox.h(25) : see declaration of
>'wxRadioBox'
>NMAKE : fatal error U1077: 'cl' : return code '0x2'

This is fixed in the current CVs; the current cvs has many
other 2.3.1 problems solved, and is in a releaseable state
( I'll release it as soon as wxwindows 2.2.8 is out ); it is
available from wxperl.sf.net -> cvs snapshots

>2. Given that I get things going with wxWindows 2.3.1, can someone give
>me (or point me to) an overview of how to use XML-based resource files
>in wxPerl?

my $res = Wx::XmlResource->new;
$res->InitAllHandlers
$res->Load( 'file.xrc' );

nethods:

LoadMenu( name )
LoadMenuBar( name )
LoadToolBar( parent, name )
LoadDialog( parent, name )
// this populates an already created dialog
// ( useful for derived classes )
LoadOnDialog( dialog, parent, name )
LoadPanel( parent, name )
// for an already created panel
LoadOnPanel( panel, parent, name )
LoadFrame( frame, parent, name )
LoadBitmap( name )
LoadIcon( name )
// for external controls
AttachUnknownControl( name, control, parent = 0 )

for the format of the xml itself:
contrib/src/xrc/format.txt
contrib/samples/xrc/rc/*.xrc

are the only references

>3. Is there a  GUI designer available which will create resource files?
>I've looked at wxDesigner - is there another one included with
>wxWindows?
There is one written in Python ( using wxPython )
in
http://cvs.wxwindows.org/cgi-bin/viewcvs.cgi/wxPython/tools/XRCed/

There is wxWorkshop ( but it is a beta, and not yet available in binary
form )
I personally write the perl code by hand, so i can't be of much
help here...

Hope this helps
Mattia


0
mbarbon
1/23/2014 1:01:01 AM
Reply: