Re: glade2perl: Does it work? (And some more on glade in general)



OK. I finally got around to testing this again.

First of all: I now get the following warning when I generate source code:

Tue Feb 29 09:30:05 2000 Gtk-WARNING **:
/usr/lib/gtk/themes/engines/libbuffy.so: undefined symbol:
gtk_style_apply_default_background at
/usr/lib/perl5/site_perl/5.005/Glade/PerlGenerate.pm line 161.

I also got the following message once, but I'm unable to reproduce this now :

 Glade::PerlGenerate::Form_from_Pad_Proto('Glade::PerlGenerate',
'Glade::PerlProject=HASH(0x851d2a8)', 'HASH(0x8493868)') called at
/usr/lib/perl5/site_perl/5.005/Glade/PerlGenerate.pm line 79
 Glade::PerlGenerate::Form_from_Glade_File('Glade::PerlGenerate',
'glade_filename', '/usr/work/sys/src/gnome/launch/launch.glade') called at
/usr/bin/glade2perl line 30

I don't remember if I saw this earlier.

Secondly, I had set source directory to '.' in "project options", but this
caused the following error message to occur (this was after I figured out the
correct way to execute the application and how to avoid the message about
gnome.pm):

% perl -e 'use launch; launchMain->run'
syntax error at launch.pm line 31, near "use ."
BEGIN failed--compilation aborted at -e line 1.

I have now changed source directory to "perllib"

> > Yet another question related to glade:
>

> > Is there anybody out there who has anyone successfully built perl code
> > using glade? I have experimented a bit with this now, and while the code
> > generated looks very promising, I can't actually get my application up
> > and running. The first problem I got was that gnome.pm couldn't be
> > found. This problem was quite easily solved, I simply created a symbolic
> > link from gnome.pm to Gnome.pm in the appropriate perllib directory (I
> The correct module is Gnome.pm (capital G) and that is what my module
> expects to find and what it generates in the modules. If Glade-Perl is
> looking for gnome.pm then it is badly wrong, please email me directly.
>
> If you have gnome.pm on your system (lcase g) you have a problem.
> AFAIK Gtk-Perl has always generated Gnome.pm but the latest version
> (0.7002) definitely does. If this is the case, did you ever move it by
> hand rather than make install?

The error message was:

Can't locate gnome.pm in @INC (@INC contains:
/usr/local/lib/perl5/site_perl/linux /usr/local/lib/perl5/site_perl
/usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .)

but it turns out that this was caused by something different from what I
expected, see below.


> > hate having to do hacks like this, though), but I am still unable to
> > figure out how to access the perl modules generated. In particular, the
> > directives indicated in the "POD" documentation do not work.
> This is my fault, I'm sorry that this has not kept pace with the module.
> If you look at the run diagnostics you will see correct messages but...
>
> One way to run an app generated by Glade-Perl-0.48 is something like:
>   Change directory to the Glade project directory and then
>   perl -e 'use src::Project; window->run'; # (change to your names)

Right. I can actually see my window now, although I also get a warning about
apply_default_background when I start the application. My command and output
are included below.

% perl -e 'use perllib::launch; launchMain->run'
Tue Feb 29 10:01:45 2000 Gtk-WARNING **:
/usr/lib/gtk/themes/engines/libbuffy.so: undefined symbol:
gtk_style_apply_default_background at perllib/launchUI.pm line 98.

It would be nice with correct documentation, though, as the the lack of it
limits the usefulness of the whole package a lot. And of course, incorrect
documentation is worse than no documentation.

>
> > I am using perl-Glade-Perl-0.48-6 and Gtk-Perl-0.6123-1.
> Gtk-Perl is now at version 0.7002 and I would recommend that you upgrade
> to this. You will need to read the docs to find out how to install it as
> Gtk-Perl does not now make all the submodules from the toplevel make.
> You can find it at ftp://ftp.gnome.org/pub/lupus/

I'll try this earlier.

>
>
> I will be releasing version Glade-Perl-0.49 in the a few days.
> Among other things, this deals with 'funny' Glade project names better
> (it removes spaces, minuses and dots from the project name).
>
> Make sure that you don't have any of these (' ', '-' or '.') in your Glade
> project name.

I see. I had included a '-', with the magical word 'gnome' in front of it,
which was the cause of a lot of my problems. Apparently all the noise about
gnome.pm was a result of this!

>
> Do you have a (small) project that fails to run? If you do, please can you
> send me (privately) the Project.glade file and two of the four generated
> files from your source_directory (Project.pm ProjectUI.pm) and I will see
> that they are generated correctly.

I don't bother to include them now, as everything works fine.

Thanks for your help.

- Toralf



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]