Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

New window won't open

$
0
0

In my app I've got a tableView. When the user clicks on a row, I want to open a new window to show details of that row. I've done this with a "Click" event on the tableView itself.

Due to logging problems, I debug by alert() boxes.

I've removed unnecessary code

{appname}/Resources/ui/handheld/android/myWindow.js

tableView.addEventListener("click", function(e){
    // getting data to pass to the window, works
    alert("click event fired"); // is shown
    var detailMaandWindow = Titanium.UI.createWindow({
//      url:'detailMaand.js',  does not work
//      url:'Resources/detailMaand.js',  does not work
//      url:'/Resources/detailMaand.js',  does not work
//      url:'../../../detailMaand.js',  does not work
        url:'/detailMaand.js', // does not work either
        top: 0
    });
    detailMaandWindow.open();
    alert("flag: detailMaandWindow created and opened"); // is shown
});
I've created 2 identical files:

{appname}/Resources/ui/handheld/android/detailMaand.js

{appname}/Resources/detailMaand.js

With at the very first line:

alert("hi");
I assume that the rest of the code in this file won't matter on how this alert() box behaves.

The problem: the alert("hi"); doesn't show up. What am I doing wrong?

I am using Windows 7, CLI version 3.1.2, Titanium SDK version 3.1.3.GA

I am testing on a physical HTC One with Android 4.3


Viewing all articles
Browse latest Browse all 7655

Trending Articles