From: Richard Dale Date: 2004-09-30T19:40:02+09:00 Subject: Re: ruboids (on mac os) - singleton instance() returns nil? Michal 'hramrach' Suchanek wrote: > hehe, I tried running the ruboids I have on the correct display and the > singleton is still broken. So there is not much difference wrt the build > system used to compile the extension. > irb(main):001:0> require 'Qt' => true irb(main):002:0> require 'singleton' => true irb(main):003:0> class Single < Qt::Object irb(main):004:1> include Singleton irb(main):005:1> def initialize irb(main):006:2> super irb(main):007:2> puts "in initialize" irb(main):008:2> end irb(main):009:1> end => nil irb(main):010:0> Single.instance in initialize => # irb(main):011:0> Single.instance => # irb(main):012:0> You weren't calling super in your original irb log. It looks like you didn't need to do that in Ruby/Qt, but you do in QtRuby. -- Richard