i have this code in app.js
btnDestinasi.addEventListener('click', function(e){ var winDestinasi = Titanium.UI.createWindow({ url:'ui/destinasi.js', title:'Destinasi' }); Titanium.UI.currentWindow(winDestinasi); });and this code in destinasi.js
var win = Titanium.UI.currentWindows;
show error if running application in iphone but in android success
[WARN] Exception in event callback. { expressionBeginOffset = 1509; expressionCaretOffset = 1528; expressionEndOffset = 1533; line = 73; message = "Result of expression 'Titanium.UI.currentWindow' [null] is not an object."; name = TypeError; sourceId = 239175312; sourceURL = "file://localhost/Users/vman/Documents/Titanium%20Studio%Workspace/Destination/Resources/app.js";how to resolved this problem??
1 Answer
A couple things here I guess. First, this does not exist: Titanium.UI.currentWindows, it should be Titanium.UI.currentWindow.
Second, Ti.UI.currentWindow does not take an argument, so you cannot do this: Titanium.UI.currentWindow(winDestinasi);
Other than that, Im not quite sure what it is that you're trying to do, so straighten those things out and see how it helps, then post back.
Your Answer
Think you can help? Login to answer this question!