What method is triggered when a search has completed ?
I’m trying to figure out a way to make an animated gif appear when the search starts and then disappear when the search is done.
What method is triggered when a search has completed ?
I’m trying to figure out a way to make an animated gif appear when the search starts and then disappear when the search is done.
Why don’t you simply show the gif before calling search() and hide it right after? As in
controller.find()
...
showGif();
controller.search()
hideGif();
I have two buttons on my test form… ‘Enter Query Mode’ and ‘Execute Query’.
This is in the ‘Enter Query’ method…
controller.find()
This is in the ‘Execute Query’ method…
elements.progress_bar.visible = true;
var recordSet = controller.search();
controller.showRecords(recordSet);
elements.progress_bar.visible = false;
The ‘progress_bar’ gif image does not show at all.
Then I tried this code in my ‘Enter Query Mode’ button…
elements.progress_bar.visible = true;
controller.find()
… and this in my ‘Execute Query’ button…
var recordSet = controller.search();
controller.showRecords(recordSet);
elements.progress_bar.visible = false;
Then the gif shows up — but right after the ‘Enter Query Mode’ button is pressed (which is not what I want). I want the gif to show up only after the user presses the ‘Execute Query’ button.
Ideas ?
The UI is not updated while a methid is running, unless you specifically tell it to do so using application.updateUI().
Paul