Hey I've got a couple of webviews that use JS libraries like multitouch-fake.js and a jquery webview for painting.
they all work fine the first time I open them, but whenever I close them, and open them again they don't respond anymore
Is this fixable
2 Answers
Patrick
Try to make sure that you create (ie the variable that stores the object), open and close them within an eventListener. This will ensure that they are properly torn down when the event finishes.
Cheers
Yes My order is like this:
app: js
Ti.include('./painting/painting.js'); openPainter = function() { paint.add(menuContainer); paint.open(); paintingOpen = true; }; closePainter = function() { book.add(menuContainer); paint.close(); };painting.js :
var paint = Ti.UI.createWindow({ backgroundColor: 'transparent', width: 1024, height: 768 }); var paintingView = Titanium.UI.createWebView({ backgroundColor: 'transparent', top: 0, left: 0, width: 1024, height: 768, url:'./painting/index.html', zIndex: 4 }); paint.add(paintingView);
index.html:
http://pastebin.com/DQ6n7qbT
I use fireEvent to change brush color through buttons in app.js
Your Answer
Think you can help? Login to answer this question!