[Rd] active bindings and ls.str

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Tue Jun 30 13:51:19 CEST 2009


On Tuesday 30 June 2009, Romain Francois wrote:
> This was more of a question. I'd like to know if there is a way for
> objects to broadcast that they have changed.
> This would be very useful to for example implement an object browser in
> a front-end, which I guess is part of the reason for the trick ?

Yes, that's around half the reason. The other half is our data.frame-editor, 
which tries to create the illusion of "in-place" editing. For that it's pretty 
important to keep the editor data in sync with R's version of the data.frame.

I would certainly like to see an easier way to detect changed objects as well.

> The problem is as soon as you pass it to a function, you force the
> promise, maybe passing the symbol instead could do the trick, but I have
> not seen something that brings the information that an object is a
> promise. Maybe you are right and I am not supposed to play with them ...

Yes, passing the symbol does the trick, indeed. (And until a few minutes ago, 
there was a regression in RKWard in just that respect.) 

I'll have to admit that we do play with the internals of promises in RKWard, 
too: When the only reason that we forced a promise was that the object browser 
stepped on it, we "put it back" to free up the memory, again. This works 
remarkably well, but in fact I don't think we are supposed to do this...

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20090630/55e9d278/attachment.bin>


More information about the R-devel mailing list