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

Object # has no method 'open'

$
0
0

I'm writing a simple application that has 2 windows :

index.js

function openWindow() {
    var win = Alloy.createController("welcome", {}).getView();
    win.open(); 
}

welcome.xml

<Alloy>
    <!-- Default App Window -->
    <Require id="devices" src="index" platform="android" /> 
 
    <!-- iOS Window -->
    <!NavigationWindow id="nav" platform="ios" class="container">
            <Require src="devices" />
    </NavigationWindow>
</Alloy>
Every works fine for iOS, but for android devices (or simulator) I'm getting the exception :
[ERROR] :  V8Exception: Exception occurred at alloy/controllers/index.js:122: Uncaught TypeError: Object #<Controller> has no method 'open'
[WARN] :   dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x419f7d40)
[ERROR] :  TiApplication: (main) [54008,56198] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 4.0.0,2015/05/18 15:42,9239ff9
[ERROR] :  TiApplication: java.lang.NullPointerException
Is there something wrong ?

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>