search for: callsuper

Displaying 8 results from an estimated 8 matches for "callsuper".

2011 Oct 31
1
Question about copying reference objects using the initialize method
...stion about copying reference objects using the initialize method. 1) If the latter has no arguments, there is no problem to copy an object. myClass = setRefClass("myClass", fields = list(value = "numeric") ) myClass$methods(initialize = function(...){ ? value <<- 1 ? callSuper(...) }) newObject = myClass$new() newObject$value = 2 copyObject = newObject$copy() copyObject$value = 3 print(newObject$value) print(copyObject$value) 2) However, if the initialize method has arguments, I get an error: myClass = setRefClass("myClass", fields = list(value = "nume...
2011 Jun 29
1
Ref Classes: bug with using '.self' within initialize methods?
...a call to '.self$someFoo()'). Is this a desired behavior? Thanks for any clarifying comments! Janko ##### CODE EXAMPLE ##### # CLASSES setRefClass( Class="MyVirtual", contains=c("VIRTUAL"), methods=list( initialize=function(...){ callSuper(...) return(.self) }, someInitFoo=function(flds, ...){ someInitFooRefInner( .self=.self, flds=flds ) } ) ) GENERATOR <- setRefClass( Class="MyClass", contains=c("MyVi...
2010 Dec 16
0
R 2.12.1 is released
...and sometimes lost the labels on the points. Its return value was described wrongly (it is always a list and contains component ac). ? promptClass() in package methods now works for reference classes and gives a suitably specialized skeleton of documentation. Also, callSuper() now works via the methods() invocation as well as for initially specified methods. ? download.file() could leave the destination file open if the URL was not able to be opened. (PR#14414) ? Assignment of an environment to functions or as an attribute to other objects...
2010 Dec 16
0
R 2.12.1 is released
...and sometimes lost the labels on the points. Its return value was described wrongly (it is always a list and contains component ac). ? promptClass() in package methods now works for reference classes and gives a suitably specialized skeleton of documentation. Also, callSuper() now works via the methods() invocation as well as for initially specified methods. ? download.file() could leave the destination file open if the URL was not able to be opened. (PR#14414) ? Assignment of an environment to functions or as an attribute to other objects...
2011 Jun 01
1
possibly invalid assertion in setRefClass?
> setRefClass("Foo", fields = list()) Error in setRefClass("Foo", fields = list()) : A list argument for fields must have nonempty names for all the fields In my opinion, the above should not fail. There are no fields. Thanks, Michael [[alternative HTML version deleted]]
2011 May 27
1
Reference Classes/S4 Classes: can method dispatch check superclasses BEFORE resorting to method for "ANY"?
Dear list, is it possible that method dispatch checks for superclasses/virtual classes before checking "ANY"? I'd like to build a generic initialization method for all my Reference Class (say "MyDataFrame") objects by having them inherit from class, say "MyRefClassVirtual" (which would have to be a virtual S4 class; there are no virtual Reference Classes,
2010 Nov 17
2
Reference classes: accessor functions via 'getRefClass(...)$accessors(...)'
Hi there, I''d like to choose between an "static" and "dynamic" access of a reference class field, say ''a''. myObj <- getRefClass("Blabla")$new() Static: myObj$a Dynamic: myObj$a.get() where the function retrieves the data from a database (or some other location), stores it to a buffer and
2011 Sep 24
1
Can't reliably use RefClass methods in Snowfall
Greetings, I am trying to use Reference Class methods in Snowfall, using R 2.12.1 on Ubuntu Natty. Using then directly seems to work (stanza 2 below), but using them indirectly does not (stanza 3 below). I get an "attempt to apply non-function" error. In addition to exporting the instance of the object I created to the Snowfall slaves, I also made several attempts to export the