Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Closing activity indicator from with another controller

$
0
0

Hi,

I have 4 controllers, index.js, token.js, main.js and token.js. Index checks for authentication and redirects to token.js for user details if no details is found. If authentication checks then it opens the main.js carrying the user details. Now, just right after open() command inside token.js, I have this line to show indicator activity:

var dispIndicator = Alloy.createController('loader').getView();
dispIndicator.open();
Now, I didn't use timeout for indicator because I want to be precise as to when the display is complete behind main.js processes. When everything is fetched and all elements are ready, inside main.js I have this lines to close the indicator:
var dispIndicator = Alloy.createController('loader').getView();
dispIndicator.close(); // also tried hide();
However, this doesn't work but gives an 'undefined' error.

How can I close the loader from within main controller?

thanks.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>