From spinuvit.list at gmail.com  Wed Nov 10 13:49:19 2010
From: spinuvit.list at gmail.com (Vitalie S.)
Date: Wed, 10 Nov 2010 13:49:19 +0100
Subject: [Rd] callNextMethod fails with "$" generic
Message-ID: <cpnaalhfink.fsf@gmail.com>


Dear Developers,

callNextMethods does not work with "$"

setClass("mylist", contains = "list"):
setMethod("$",
          signature(x = "mylist"),
          function (x, name){
              cat("here:\n")
              callNextMethod()
          })

tl <- new("mylist")
tl[["x"]] <- 343

tl$x
#here:
#NULL


If I use callNextMethod(x=x, name=name)

this error is issued:

Error in function (classes, fdef, mtable)  :
  unable to find an inherited method for function "addNextMethod", for signature "function"

It must be something "$" specific. If the above is an expected behavior , how
should I call next method for "$" generic?

My info:
R version 2.12.0 Patched (2010-11-01 r53513)
Platform: i386-pc-mingw32/i386 (32-bit)

Same behavior for official R 2.12.0.

Thanks,
Vitalie.



[Rd] callNextMethod fails with "$" generic
Vitalie S.