Question:
If I make two classes like such:foobar
for the class SubClass
that can call the foobar
method for SuperClass
and then do some other SubClass
specific computation?The method could look something like this:
Answer:
You needcallNextMethod
:setMethod(“foobar”, “SubClass”, function(x) {
callNextMethod()
cat(x@b, “\n”, sep=””)
})
x <- new("SubClass")
foobar(x)
# A
# B
[/code]
If you have better answer, please add a comment about this, thank you!