There's currently no way to call a superclass' method. I've just run
into this and leo suggested I sent a note to the list.

Here's what I want to do:

I have a ParrotClass (a class defined in PIR) that is derived from the
String class. I want to override it's set_string_native method to do
some processing before I store the value. My first attempt was this:

    .sub __set_string_native method
      .param string value
      self = value
      print "assign\n"
    .end

Of course, that doesn't work: `self = value` just calls the method
again and you quickly hit the recursion limit. While I probably won't
be able to use the = syntax, I should be able to call the parent's
method (since I can't actually set the string value myself like I can
in PMC-land).

Something like this ought to work:

     .sub __set_string_native method
      .param string value
      self.SUPER::__set_string_native(value)
      print "assign\n"
    .end

I don't really care how it looks really, as long as it's possible. Any
thoughts? It'd be nice to get this specced so that it can be
implemented.

Thanks.

-- 
matt diephouse
http://matt.diephouse.com

Reply via email to