From thomas.friedrichsmeier at ruhr-uni-bochum.de  Tue Jun 30 13:51:19 2009
From: thomas.friedrichsmeier at ruhr-uni-bochum.de (Thomas Friedrichsmeier)
Date: 30 Jun 2009 13:51:19 +0200
Subject: [Rd] active bindings and ls.str
In-Reply-To: <4A49E1DA.4060809@dbmail.com>
References: <4A4932D8.1040501@dbmail.com>
	<200906301141.37573.thomas.friedrichsmeier@ruhr-uni-bochum.de>
	<4A49E1DA.4060809@dbmail.com>
Message-ID: <200906301351.23177.thomas.friedrichsmeier@ruhr-uni-bochum.de>

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>


[Rd] active bindings and ls.str
Thomas Friedrichsmeier