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

Can not access navigationWindow from alloy.js

$
0
0

Hi, I am using titanium alloy for my project. I have some logic for opening and closing windows. For this logic i use small class which is written in alloy.js.

Alloy.Globals.nav = new Navigation();
my <NavigationWindow> element is in the index.xml where
Alloy.Globals.nav.setNaviWin($.naviWin)
the problem is that when i do
someWindow = Alloy.createController("login").getView();
Alloy.Globals.nav.openWindow(someWindow);
which is in alloy.js as:
funcition Navigation(){
........other code..........
        function setNaviWin(naviWin){
            this.naviWin = naviWin;
        }
........other code..........
    function openWindow(win){
              this.naviWin.openWindow(win);
        }
....other code.............
}
new window do not opens!?!?

But if i do this in index.js it works:

someWindow = Alloy.createController("login").getView();
$.naviWin.openWindow(someWindow);
Any ideas why it is not working with my navigation class in alloy.js? I debugged that this.naviWin in navigation object is properly assigned

Viewing all articles
Browse latest Browse all 8068

Trending Articles



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