From marc.carpentier at ymail.com  Fri Jan 28 20:01:43 2011
From: marc.carpentier at ymail.com (Marc Carpentier)
Date: Fri, 28 Jan 2011 19:01:43 +0000 (GMT)
Subject: [Rd] ReferenceClasses examples {method}
Message-ID: <750123.43782.qm@web28204.mail.ukl.yahoo.com>

Dear r-devel-list, dear John Chambers,

I'm trying to learn OOP-possibilities in R and I was going through the 
documentation 'ReferenceClasses {methods}' (great work, by the way...).
Reading associated Examples, something bothers me : it seems to me that there 
are errors in 'edit' and 'undo' methods. I think that :
- 'undo' should update 'edits' field with :
length(edits) <<- length(edits) - 1 #(and not - 2)
- and for coherence, 'edit' should store modifications in an 'append'-style :
edits <<- c(edits,list(backup)) #as opposed to c(list(backup),edits)

I hope I'm not wrong and this hasn't been previously reported (I didn't find 
anything about it)
Best regards.

PS: I first posted this message on help-list. David Winsemius suggested  me 
devel-list would probably be more appropriate and was right about that. Sorry if 
you read it  again.
PPS: please associate my address when responding because I didn't subscribe to 
r-devel-list (I'm still far from being able to follow all its discussions...)







[Rd] ReferenceClasses examples {method}
Marc Carpentier