Forum: Ruby-Gnome 2 [BUG] GladeXML::BUFFER

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4913bcb685792f601ae9813b4713abb9?d=identicon&s=25 Detlef Reichl (Guest)
on 2007-01-16 22:46
(Received via mailing list)
Hi,

if you want to create widgets from a GladeXML::BUFFER it gives you the
following error message:

det@datengrab:~/Desktop$ ruby rubydatei.rb
/usr/local/lib/site_ruby/1.8/libglade2.rb:85:in `readlines': can't
convert nil into String (TypeError)
        from /usr/local/lib/site_ruby/1.8/libglade2.rb:85:in
`build_names'
        from /usr/local/lib/site_ruby/1.8/libglade2.rb:55:in
`widget_names'
        from /usr/local/lib/site_ruby/1.8/libglade2.rb:97:in
`guard_sources_from_gc'
        from rubydatei.rb:18:in `initialize'
        from rubydatei.rb:18:in `new'
        from rubydatei.rb:18



Here is the example program:



#!/usr/bin/ruby

require 'libglade2'
require 'gtk2'


class Win < Gtk::Window
  idata = '<glade-interface>
    <widget class="GtkImage" id="image">
      <property name="visible">True</property>
      <property name="xalign">0.5</property>
      <property name="yalign">0.5</property>
      <property name="xpad">0</property>
      <property name="ypad">0</property>
    </widget>
</glade-interface>'

  glade = GladeXML.new idata, 'image', nil, GladeXML::BUFFER
  image = glade['image']
  self.add image
  self.default_size 200, 200
end


win = Win.new
win.show_all
Gtk.main



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p...
9fe908f5593444a40be14a424c372e58?d=identicon&s=25 Masao Mutoh (Guest)
on 2007-01-20 17:02
(Received via mailing list)
Hi,

On Tue, 16 Jan 2007 22:28:31 +0100
Detlef Reichl <detlef.reichl@gmx.org> wrote:

> Hi,
>
> if you want to create widgets from a GladeXML::BUFFER it gives you the
> following error message:

Fixed. Thanks.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p...
4913bcb685792f601ae9813b4713abb9?d=identicon&s=25 Detlef Reichl (Guest)
on 2007-01-20 17:51
(Received via mailing list)
Am Sonntag, den 21.01.2007, 01:01 +0900 schrieb Masao Mutoh:
> Fixed. Thanks.
>
Thanks for the fast Fix!


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p...
This topic is locked and can not be replied to.