Posted by shahbazc
on December 9, 2008 at 12:54 PM PST
Say I have an object with four or five attributes. I would like to bind these attributes to some expression. Every time one of the attributes changes, a function is evaluated. In other words, say a function simply prints out the bound attributes. Every time an attribute changes, the values are printed again.
I would like to do this in a declarative manner -- in other words, I'd like to avoid wrapping attributes in 'setter' functions which then call the print function.
I'm not sure if it is possible, but I'd also like to avoid littering my code with onreplace triggers.
Basically I am trying to put a declarative interface on top of a very imperative code (the underlying application is actually a network based app).