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

**URL:** <https://www.ruby-forum.com/t/bug-libglade-with-more-than-one-window-0-16-0/80717>\
**Category:** Ruby-Gnome 2\
**Created:** [December 30, 2006, 4:30pm UTC](https://www.ruby-forum.com/t/bug-libglade-with-more-than-one-window-0-16-0/80717 "2006-12-30T16:30:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [December 30, 2006, 4:30pm UTC](https://www.ruby-forum.com/t/bug-libglade-with-more-than-one-window-0-16-0/80717/1 "2006-12-30T16:30:01Z")

</div>

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 method`signal\_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:in`guard\_sources\_from\_gc’  
from bla.rb:8:in `initialize’  
from bla.rb:18

I’ve attached a simple example.

Cheers  
detlef

---

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [December 31, 2006, 4:41am UTC](https://www.ruby-forum.com/t/bug-libglade-with-more-than-one-window-0-16-0/80717/2 "2006-12-31T04:41:28Z")

</div>

Hi,

In [1167491733.4300.7.camel@datengrab](mailto: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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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](http://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](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)
