lib/knj/ironruby-gtk2/window.rb in knjrbfw-0.0.8 vs lib/knj/ironruby-gtk2/window.rb in knjrbfw-0.0.9

- old
+ new

@@ -1,23 +1,23 @@ Gtk.events["Gtk"]["Window"] = { - "destroy" => "destroyed" + "destroy" => "destroyed" } class Gtk::Window - def initialize(title = "") - if Gtk.takeob - @ob = Gtk.takeob - Gtk.takeob = nil - else - splitted = self.class.to_s.split("::") - @ob = RealGtk.const_get(splitted.last).new(title) - end - - if !@ob - raise "Object was not spawned: #{self.class.to_s}" - end - end - - def add(widget) - @ob.add(widget.ob) - end + def initialize(title = "") + if Gtk.takeob + @ob = Gtk.takeob + Gtk.takeob = nil + else + splitted = self.class.to_s.split("::") + @ob = RealGtk.const_get(splitted.last).new(title) + end + + if !@ob + raise "Object was not spawned: #{self.class.to_s}" + end + end + + def add(widget) + @ob.add(widget.ob) + end end \ No newline at end of file