Hi I have a very basic app at the minute. There are 3 web views. When there is wifi from the start all three web views will load fine. I have a check in my code where the webview is only added if there is an internet connection. If there isn't, I add a label explaining to connect to the internet and a refresh button. When i click the refresh button, the adding of the web view crashES the app. Code works in iOS, not android. Using SDK 3.2.3. Code below:
refresh.addEventListener("click", function (e){ if(Ti.Network.online){ console.log(" here 1 -----------"); Navbar.remove(refresh); console.log(" here 2 -----------"); self.remove(NoInternet_view); console.log(" here 3 -----------"); self.add(shopWebView); console.log(" here 4 -----------"); } else{ alert("An internet connection is required"); } });The log gets to the printout "here 3 ----------" and then crashes.