Re: Perl with Glade, may be a bug you know.



Hi:

Thank you for your help.

Maybe you know that there is a bug in glade or in glade-perl when you
add a toolbar the reference to the widget is not set.

The next code is to construct a button.

##### Code with error, see the third line empty at the end.

# Construct a GtkButton 'button1'
$forms->{'window1'}{'button1-pixmap'} =
 Gnome::Stock->pixmap_widget($forms->{'window1'}{'window1'}, '');
$widgets->{'button1'} =
$forms->{'window1'}{'toolbar1'}->append_element('button', undef,
_('button1'), _(''), '', $forms->{'window1'}{'button1-pixmap'} );
$widgets->{'button1'}->show;
$forms->{'window1'}{'button1'} = $widgets->{'button1'};


##### without error, see the third line from here, the word "New"

# Construct a GtkButton 'button1'
$forms->{'window1'}{'button1-pixmap'} =
 Gnome::Stock->pixmap_widget($forms->{'window1'}{'window1'}, 'New');
$widgets->{'button1'} =
$forms->{'window1'}{'toolbar1'}->append_element('button', undef,
_('button1'), _(''), '', $forms->{'window1'}{'button1-pixmap'} );
$widgets->{'button1'}->show;
$forms->{'window1'}{'button1'} = $widgets->{'button1'};



Carlos Kassab


El dom, 24-11-2002 a las 13:15, Carlos Kassab escribió:
Hi:

Please help me i am a new user of glade perl.

I have been working with glade perl and it is very good but when i add
buttons in a tool bar i get error messages like this:

Gdk-CRITICAL **: file gdkpixmap.c: line 63 (gdk_pixmap_new): assertion
`(width != 0) && (height != 0)' failed.

Gdk-CRITICAL **: file gdkgc.c: line 51 (gdk_gc_new_with_values):
assertion `window != NULL' failed.

Gdk-CRITICAL **: file gdkdraw.c: line 379 (gdk_draw_pixmap): assertion
`drawable != NULL' failed.

Gdk-CRITICAL **: file gdkgc.c: line 288 (gdk_gc_unref): assertion `gc !=
NULL' failed.
gdk_imlib ERROR: Cannot load image: /usr/share/pixmaps/
All fallbacks failed.

And the icons are not showed.

When i add just text to the tool bar it works fine.

Thank you for your help in advance.


Carlos Kassab


-- 
Consultoría ERP BaaN Tools
Aplicaciones Internet/Intranet
http://www.glin.com.mx





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