From janko.thyson.rstuff at googlemail.com  Wed Aug 24 11:35:24 2011
From: janko.thyson.rstuff at googlemail.com (Janko Thyson)
Date: Wed, 24 Aug 2011 11:35:24 +0200
Subject: [Rd] Bug in 'setRefClass()' regarding how args in '...' are passed
 to 'setClass()'?
Message-ID: <4E54C5DC.1030703@googlemail.com>

Dear list,

in ?setRefClass it says that '...' can be used to supply other arguments 
that are passed to 'setClass()'.

Yet, I think that's not true for argument 'prototype', but maybe I 
overlooked something:

setClass("Plugin")
setClass(Class="PluginDefault", contains="Plugin",
     representation=representation(.PRIMARY="function"),
     prototype=prototype(.PRIMARY=function(src) src)
)
PluginDefault <- function() new("PluginDefault")
PluginDefault()
PluginDefault()$.PRIMARY    # Desired prototype content

#+++++ START A NEW R SESSION BEFORE CONTINUING

setRefClass("Plugin")
setRefClass(Class="PluginDefault", contains="Plugin", 
fields=list(.PRIMARY="function"),
     prototype=prototype(.PRIMARY=function(src) src)
)
PluginDefault <- function() new("PluginDefault")
PluginDefault()
PluginDefault()$.PRIMARY     # No prototype content

Regards,
Janko



[Rd] Bug in 'setRefClass()' regarding how args in '...' are passed to 'setClass()'?
Janko Thyson