Quantcast
Viewing all articles
Browse latest Browse all 8068

Closing a window from another controller

Hi,

Titanium Studio 3.2.3 IOS 7.1

I have created 3 controllers (index, auth, main) with 3 xml and tss for each controllers. The index.js checks for a specific properties and it sends to auth.js if property doesn't exist. auth.js will check for authentication and if condition becomes true it opens main.js which performs network request online. But just right after main.js opens, an indicator (loader) opens from another xml's window. This works fine so far, but the problem is closing the indicator window. In main.js I added:

var dispIndicator = Alloy.createController('loader').getView();
dispIndicator.close(); // also tried $.dispIndicator.hide();
but this call an error 'undefined';

I can't post the entire code as it's now very long for 3 controllers.

Thanks


Viewing all articles
Browse latest Browse all 8068

Trending Articles