How to avoid "on text changed" event triggering on startup

“Inhibition” means “not doing it”.

Look my first answer to you 3 days ago.

The idea is that, just as you start the app, there is a variable that you set to FALSE, and that will be set to TRUE after that second (or whatever you deems necessary) delay.
And in your “procedure” the setting of the Label1.Text is allowed ONLY if that variable is TRUE.
Therefore, for the first second, any “On Text Changed” will result in the calling of the procedure that will be instructed to DO NOTHING (it is inhibited).

2 Likes

Do you want to find a solution to the problem or just a possible bug in Kodular?
So, if the first is true, check this simple solution with Taifun’s Textbox extension:

2 Likes

okay i will try it and let you know

Okay i will try with Taifun’s Textbox extension and let you know

This works exactly as you said.I used a delay of 1 sec I think it can work for even lesser delay,may be? I will try.

Thanks for the answer this too also works, but i think it won’t work when user press back instead of enter after entering value in text box?Am I right ?

It is very likely that it may require less than 1/10 of a second, but the issue there would be that the required delay could be a function of what else the device is doing at the time and how powerful it is. If someone has an older Android, it could require more time to do everything. If someone has
a few other apps pending in the background, that would also likely impact. And, at some point, you may decide to expand you application and it may find itself doing more before having all the components ready.
The bottom line is how much time are you comfortable (and would your user be) waiting before they are ready to actually use the app? Many applications make use of a splash screen for that very purpose, a “welcome” mat that shows program credit and what not; this is not purely advertisement, it is often a deliberate delay to make sure the code is really ready.

1 Like

The user will have a reason to click “back”. And what exactly does “back” mean here (back button of the device or the back button in the number field)? What doesn’t work or how do you think it should work?

Okay,thanks for the info.

i mean when we press button instead of enter in keyboard when we are entering text or number in text box,keypad closes without triggering procedure block.

which button?

sorry its back button of device

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.