The behavior obtained with the behaviorText
function will only react to changes that the user made to the edit box. It does not include programmatic changes, like those performed with the sink
function.
Distinguishing between user events and programmatic events is essential for writing responsive UI elements that have bidirectional data flow. See the CurrencyConverter example for a demonstration.
If you want to keep track of programmatic changes, I recommend to stay "within the FRP world", i.e. to use the behavior b_out = id <$> b_in
instead of trying to read the text from the widget.
(By the way, id <$> x = x
.)