I'm using the com.appcelerator.login widget. I'm creating it in the index.js controller. I would like to be able to access the widget's event listeners so I can tell when the window (which widget creates) closes. Scenario: App opens, if user not logged in the opens the login widget, after login the widget (window) closes, app then opens navigation controller.
Problem: "undefined [loginWindow] is not a function...."
index.js
//index. js $.loginWindow = Alloy.createWidget('com.appcelerator.login'); $.loginWindow.addEventListener('open', function() { if (OS_ANDROID) { $.loginWindow.activity.actionBar.hide(); }else{ setTimeout(function(){ alert('works here too...'); },5000); } });