Skip to content
nnc edited this page Sep 13, 2010 · 15 revisions

Debugging

As of PR3, the Safari console is available on Windows & OSX. Right click, inspect element, then switch to the console view. console.log messages will show up there.

?? Titanium.API.debug(msg) to log to console

Aiming Links at the Default Browser

target=“ti:systembrowser”

Python

Importing modules

class HelloWorld:
  def hello(self):
    import os, sys
    resources_dir = Titanium.App.appURLToPath("app://index.html")
    resources_dir = os.path.split(resources_dir)[0]
    sys.path.append(resources_dir)
    from gluon.sql import SQLDB
    db = SQLDB('sqlite://storage.db')

Titanium.API.set(‘py.helloworld’, HelloWorld())

More Code Samples

See http://github.com/marshall/titanium/tree/b7d072150dc14f4a2a17f92299ff663c83162454/apps

Required Modules

Process
Network

Clone this wiki locally