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.