Do I need original-cell
? Like what if I just did
(cell= (dosync
(reset! cell1 (value-fn-1 cell2 cell3))
(reset! cell2 (value-fn-2 cell1 cell3))
(reset! cell3 (value-fn-3 cell1 cell2))))
Would Javelin know that in that expression cell1
, cell2
and cell3
are Javelin cells that need watches added? I figure it would since it somehow does that for other kinds of cell=
expressions.Where those value-fn
functions compute the value of one of the cells based on the values of the other two or whatever.
it would add the watches i think, but could result in a cycle
sorry i didn't have a chance to make an example for you, will do asap
@jamesvickers19515 yes it will add the watches for you, however that would no longer be a lens cell
cell=
has 2 arguments the first is the cell to watch which updates the value for cell=
the second is a callback that should be invoked when trying to update the cell=
your example would create an infinite loop