Changing Own Notifiers Being Blocked By An Anti-Loop Mechanism....

Have a look at the following snippet:

  
 vb:textfield {  
 width = 300,  
 text = "",  
 id = 'status_command',  
 notifier = function(text)  
 if no_loop == 0 then  
 send_command(target, 'status', text)  
 no_loop = 1  
 vb.views.status_command.text = ""  
 else  
 no_loop = 0  
 end  
 end  
 },  
  
  

This used to work perfectly until a routine in 2.7 started to block changing the content of its own notifier…
I’m now trying to figure out a way to clear the specific field without having the notifier activating the function call send_command().
Using the no_loop variable condition, this was the only way to exclude both the function from being called and the field from being cleared again thus the notifier being called again.
So not only is the intervention unnecessary in the above case, the Lua anti-loop guard doesn’t change nor improve this problem-case for me, it only makes it more difficult for me to get around the problem by having to evade a new problem.
So if the loop-guard would be patient enough to wait for at least two or three cycles before throwing up an error, or allowing us to clear the view object without the notifier being triggered that would save me from a lot of hassle.

Whatever i attempt to do now to get this clearing functionality working, it is starting to look like that i have to rewrite tons of code to get it working properly again.

You can stop the feedback in both notifiers.

Pseudo code:

  
local update_a = true  
local update_b = true  
  
value_a:add_notifier(function()   
 if (update_b ) then   
 update_a = false  
 value_b.value = value_a.value  
 update_a = true  
 end   
end)  
  
value_b:add_notifier(function()   
 if (update_a) then   
 update_b = false  
 value_a.value = value_b.value  
 update_b = true  
 end   
end)  
  

or attach both "vb:textfield"s to the same document value:

  
local ObservableString = renoise.Document.ObservableString  
status_text_value = ObservableString("initial status text")  
  
...  
  
vb:textfield {  
 bind = status_text_value  
}  
  
... another one  
  
vb:textfield {  
 bind = status_text_value  
}  
  
...  
  
to manually change the value (and update both text fields)  
status_text_value.value = "new status"  
  

Thanks for the update. :)
I’ll look into it upcoming weekend, i have my head wrapped around other things currently.