Adapting existing HTML/Javascript model to Titanium's latest release (v 0.9)
Posted
by Alan Neal
on Stack Overflow
See other posts from Stack Overflow
or by Alan Neal
Published on 2010-03-07T01:32:13Z
Indexed on
2010/03/11
19:29 UTC
Read the original article
Hit count: 461
In pre-0.9 versions of Titanium, one could simply specify an .html file (local or remote) in the tiapp.xml file and interact with it in the same manner as one would on a website. As of version 0.9, that is no the longer case. One creates their entire app dynamically. Unfortunately, this broke my previous implementation and, other than an updated Kitchen Sink, much of the new model and API calls are not covered in the documentation (e.g., createLabel).
So, my question is this... What are the simplest steps for re-creating the previous effect (knowingly forgoing some of the advantages of the Titanium's latest approach if necessary)?
My previous implementation was exactly as it functions on the website. The website has a single index.html file with no content other than links to JavaScript and style files. The document body's onload event called the first JavaScript function (located in the main script) and, from that point forth, the entire content was dynamically created.
How can I set up the latest version of Titanium so that I am poised to do the exact same thing?
BTW: Whereas I previously had the choice to keep the files local or remote, I don't believe that remote access (e.g., simply using the webView widget to point to the website) is viable. That's because pages displayed via the webView do not have access to most of the API. Since the iPhone and Safari browsers do not support the file input type, the only means for uploading files (something my app requires) is calling Titanium's function.
Thanks in advance.
© Stack Overflow or respective owner