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 = ‘
True
0.5
0.5
0
0
’
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=sourceforge&CID=DEVDEV