The R Project SVN R

Rev

Rev 61058 | Rev 88267 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61058 Rev 62700
Line 255... Line 255...
255
xx$save(tf) #$
255
xx$save(tf) #$
256
load(tf)
256
load(tf)
257
unlink(tf)
257
unlink(tf)
258
stopifnot(identical(xx$data, .self$data))
258
stopifnot(identical(xx$data, .self$data))
259
 
259
 
-
 
260
## tests of $trace() methods
-
 
261
## debugging an object
-
 
262
xx$trace(edit, quote(xxTrace <<- TRUE))
-
 
263
 
-
 
264
## debugging all objects from class mEditor in method $undo()
-
 
265
mEditor$trace(undo, quote(mETrace <<- TRUE))
-
 
266
 
-
 
267
xxTrace <- mETrace <- FALSE
-
 
268
xx$edit(2,3,100)
-
 
269
xx$undo()
-
 
270
 
-
 
271
## will not have changed the xx$undo() method (already used)
-
 
272
stopifnot(identical(xxTrace, TRUE), identical(mETrace, FALSE))
-
 
273
 
-
 
274
## but a new object works the other way around
-
 
275
xxTrace <- mETrace <- FALSE
-
 
276
xx <- mEditor(data = xMat)
-
 
277
xx$edit(2,3,100)
-
 
278
xx$undo()
-
 
279
stopifnot(identical(xxTrace, FALSE), identical(mETrace, TRUE))
-
 
280
 
-
 
281
 
-
 
282
 
260
markViewer <- ""
283
markViewer <- ""
261
setMarkViewer <- function(what)
284
setMarkViewer <- function(what)
262
    markViewer <<- what
285
    markViewer <<- what
263
 
286
 
264
## Inheriting a reference class:  a matrix viewer
287
## Inheriting a reference class:  a matrix viewer