[nimx](https://github.com/yglukhov/nimx) solves this problem in a way inspired by Apple obj-c frameworks: type View = ref object of RootObj Button = ref object of View method init*(v: View, r: Rect) {.base.} = echo "init view" proc new[T: View](t: typedesc[T], r: Rect): T = result.new() result.init(r) method init*(b: Button, r: Rect) = procCall b.View.init(r) echo "init button" let myButton = Button.new(makeRect(0, 0, 100, 100))
- Extending objects and initialization Stefan_Salewski
- Re: Extending objects and initialization scriptkiddy
- Re: Extending objects and initialization Stefan_Salewski
- Re: Extending objects and initialization Jehan
- Re: Extending objects and initialization Stefan_Salewski
- Re: Extending objects and initializa... yglukhov
- Re: Extending objects and initia... Stefan_Salewski
- Re: Extending objects and in... mashingan
- Re: Extending objects and in... Stefan_Salewski
