Greetings,
Meanwhile I have figured out how do do it only to find out that I have more
serious problems.
Generally calling Base::f on the base class object is not what you want,
instead you want to call
Base::f on the full object for the following reasons:
If the base class is virtual, then
Sorry,
if the previous message seems without context.
Indeed, the first message was bounced by filtering rules (triggered by subject
heading than which nothing could be more benign or less liable to suspician).
It was:
Greetings,
I have an S4 class B (Base) which defines a function
On 17/10/2013 9:01 AM, Michael Meyer wrote:
Sorry,
if the previous message seems without context.
Indeed, the first message was bounced by filtering rules (triggered by subject
heading than which nothing could be more benign or less liable to suspician).
It was:
Greetings,
I have an S4
Quote
By the way, your use of the syntax D::f and B::f suggests that youapos;re
thinking from a C++ point of view. Thatapos;s very likely to lead to
frustration: the S4 object system is very different from C++. Methods
donapos;t belong to classes, they belong to generics. There is no such
Greetings,
I have an S4 class B (Base) which defines a function f=f(this=B,...)
Dervided from B we have a derived class D which also defines a function
f=f(this=D,...)
In the definition of D::f we want to call the version B::f and could do this by
simply calling
f(baseClassObject(this),...)
On 10/17/2013 08:54 AM, Michael Meyer wrote:
Suppose you have a base class Base which implements a function Base::F
which works in most contexts but not in the context of ComplicatedDerived
class
where some preparation has to happen before this very same function can be
called.
You would
@Martin Morgan, Duncan Murdoch:
OK Thanks.
I did not understand the callNextMethod.
I will investigate this in detail.
This is great!
Thanks again,
Michael Meyer
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
7 matches
Mail list logo