Method: Gtk::Window#initialize
- Defined in:
- lib/knj/ironruby-gtk2/window.rb
#initialize(title = "") ⇒ Window
Returns a new instance of Window.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/knj/ironruby-gtk2/window.rb', line 6 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 |