How to super?

Will Coleda will at coleda.com
Fri Oct 30 04:54:35 UTC 2009


Ages past, I wrote a subclass of my TclArray (itself a PMC with a
parent of Hash) to provide [trace] functionality for the array.

I overrode get_pmc_keyed, did some work to make the trace work, and
then ended with:

  # Delegate to our parent..
  $P0 = getattribute self, ['TclArray'], 'proxy'
  .local pmc result
  result = $P0[key]
  .return (result)


However, this was disabled for some time, and when I tried to
re-enable it, I started getting:

No such attribute 'proxy' in class 'TclArray'

Which is not unexpected, as now TclArray is now written in PIR, not C
(as it was when this was originally written.)

So, how does one dispatch to one's parent's vtable? Looking for
super|parent under docs, src/ops and src/pmc doesn't show any likely
candidates.

-- 
Will "Coke" Coleda


More information about the parrot-dev mailing list