[BUG] libglade with more than one window (0.16.0)

Hi,

I’ve just installed ruby-gnome 0.16 but it give me some problems with
libglade.

If you have a project with more than one window and only pharse a part
of the XML-tree it throws this error message:

/usr/local/lib/site_ruby/1.8/libglade2.rb:105:in guard_source_from_gc': undefined methodsignal_connect’ for nil:NilClass (NoMethodError)
from /usr/local/lib/site_ruby/1.8/libglade2.rb:98:in
guard_sources_from_gc' from /usr/local/lib/site_ruby/1.8/libglade2.rb:97:inguard_sources_from_gc’
from bla.rb:8:in `initialize’
from bla.rb:18

I’ve attached a simple example.

Cheers
detlef

Hi,

In 1167491733.4300.7.camel@datengrab
“[ruby-gnome2-devel-en] [BUG] libglade with more than one window
(0.16.0)” on Sat, 30 Dec 2006 16:15:33 +0100,
Detlef R. [email protected] wrote:

I’ve just installed ruby-gnome 0.16 but it give me some problems with
libglade.

If you have a project with more than one window and only pharse a part
of the XML-tree it throws this error message:

Thanks for reporting. I’ve fixed in CVS.

If you can’t wait next Ruby/Libglade2, you have a workaround
for this problem:

require ‘libglade2’

class GladeXML
alias_method :guard_source_from_gc_without_nil_check,
:guard_source_from_gc
def guard_source_from_gc(source)
return if source.nil?
guard_source_from_gc_without_nil_check(source)
end
end

Thanks,

kou


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