Hello, Everyone!
This material will show how to avoid strange issue of qva.GetQvObject method.
The issue is response from this method's callback is repeated multiple times.
Honestly I don't know why it's happening, but I know how to struggle with it.
Let's take a look at simple instance. We have an extension that should create a rabbit each time we press the button "Rabbit!".
After three hits we want to get something like this:
We use qva.GetQvObject method for getting a value from TextBox text with "var_tb" ID:
If we don't use special preventing condition our result after three hits will be:
This is definitely not what we want. After few more clicks we will have a plenty of rabbits.
All you need to do is to add an extra IF-condition which will prevent of using callback function if true:
That's all. "stop_multi" will be increased each time method is passed so when we get value of it greater that zero callback will be prevented.
Hope it will help you with improved development 😃