Modal Window crashes
Hi All
updated to 1.4.0 and running SDK 4.0 in the emulator. Im getting some weired things happening and current trying to log all the bugs i now have with my app.
Mainly databases driven tableviews randomly not populating and then when you go back the data is there. But the one which is crashing the app on click is this
var mapBtn = Titanium.UI.createButton({title:'View Map'});
win.rightNavButton = mapBtn;
mapBtn.addEventListener('click', function()
{
var w = Titanium.UI.createWindow({
backgroundColor:'#336699',
title:'Location',
barColor:'#001336',
url:'business_map_view.js',
});
var b = Titanium.UI.createButton({
title:'Close',
style:Titanium.UI.iPhone.SystemButtonStyle.PLAIN
});
w.setRightNavButton(b);
b.addEventListener('click',function()
{
w.close();
})
w.open({modal:true});
});
What has changed to cause this to now crash?
Thanks
2 Answers
-
The code you posted works for me without crashes or errors, so I'm guessing something in business_map_view.js file is causing the crash.
Are you creating a MapView in that file? If you do, does the app also crash if you comment out the MapView parts?
-
You were right! it was business_map_view.js. Database path had a space.! SUch a school boy error!
Thank you.