ppibburr

Results 9 comments of ppibburr

inspired by Vala and in regards to Vala's construct block, yes, when initialization code should always be run, regardless of the constructor invoked, use the `construct` block.

The naming could be any name. Just rolled with what I was familiar with. As for calling from initialize. `cast` also will call `initialize` so I placed it in the...

wouldn't the constructor code be being called too much? say i have a container with children of MyType, the children have thier states changed by the user, I then iter...

Heres an example that demonstrates why the hook in initialize woud not best. ```ruby require "../src/gtk/autorun" class MyWidget < Gtk::Button def initialize(ptr) super setup end def setup self.label = "Default...

This now allows constructor and cast calls to fire the instantiated code at the proper time. It also allows to yield or return the exact subclass instance if one chooses...

```ruby class MyType < SuperType def instantiate ## do stuff # ... ## used to return this exact wrapper keep_wrapper end end container.add mt=MyType.new container.foreach do |c| _mt = c.as(MyType)...

This hasn't been merged?