Re: [Rd] active bindings and ls.str

2009-06-30 Thread Tony Plate
Thomas Friedrichsmeier wrote: 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

Re: [Rd] active bindings and ls.str

2009-06-30 Thread Thomas Friedrichsmeier
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 t

Re: [Rd] active bindings and ls.str

2009-06-30 Thread Romain Francois
On 06/30/2009 11:41 AM, Thomas Friedrichsmeier wrote: > Hi, > > On Tuesday 30 June 2009, Romain Francois wrote: > >> Not sure your trick is full-proof. What happens when the variable you >> copy is already an active binding ? >> > > see promises, below. > >> There should be another wa

Re: [Rd] active bindings and ls.str

2009-06-30 Thread Thomas Friedrichsmeier
Hi, On Tuesday 30 June 2009, Romain Francois wrote: > Not sure your trick is full-proof. What happens when the variable you > copy is already an active binding ? see promises, below. > There should be another way to track > changes. I'm open to suggestions. > It is more about seeing what the o

Re: [Rd] active bindings and ls.str

2009-06-30 Thread Romain Francois
On 06/30/2009 10:35 AM, Thomas Friedrichsmeier wrote: > On Monday 29 June 2009, Romain Francois wrote: > >> I'm attaching a patch that prints this instead: >> > ls.str() >> >> xx : >> >> Although a better behaviour would be to show the binding function. >> > > I can see your point, but

Re: [Rd] active bindings and ls.str

2009-06-30 Thread Thomas Friedrichsmeier
On Monday 29 June 2009, Romain Francois wrote: > I'm attaching a patch that prints this instead: > > ls.str() > > xx : > > Although a better behaviour would be to show the binding function. I can see your point, but note that active bindings are not necessarily slow, and a special treatment may

[Rd] active bindings and ls.str

2009-06-29 Thread Romain Francois
Hello, Should active binding appear as such in ls.str. > makeActiveBinding( "xx", function(arg){ Sys.sleep(10) }, .GlobalEnv ) > ls.str() # takes 10 seconds xx : NULL What we see here is the result of the "setter" of the binding. I'm attaching a patch that prints this instead: > ls.str() xx