It is, but I have to say that I always found the super_foo syntax confusing in RubyCocoa. That's probably because I came to Ruby from ObjC, not ObjC from Ruby... I kept wishing that:
super.foo() would work. Is that possible?
Hi Pierce,
That syntax wouldn't work because calling "super" will call the method you're in from the superclass. AND it may/will return an object. In your example you are calling #foo on the result object of the super call.
But that would be the functionality I suggest yes.
About the weird syntax in RubyCocoa, I agree. But this wouldn't be a compatibility layer without supporting it's intricacies now would it :)
Hmmm... Given that this is something where Ruby/ObjC (or for that matter Java) butt heads, I wonder if there should be a better syntax? Like: def bar() superclass.foo() # call the superclasses implementation of foo() end I could probably learn to remember to type superclass instead of super. Pierce
Eloy
PS: Is it me or is the return-path for the emails coming from the ML incorrect? I guess it should point to macruby-devel@lists.macosforge.org instead of Pierce...
That happens to me as well.