Repository navigation
Javascript API
marshall edited this page Sep 13, 2010
·
106 revisions
The following APIs are in progress and likely to change.
The “ti” object is the main interface that the application will interact with the gain access to Titanium services.
getTitle, setTitle(title)
getIcon, setIcon(icon)
hide
show
activate
minimize
beep
playSound(sound)
playNamedSound(soundName)
quit
setIcon(icon)
setBadge(badge)
sets the value on the badge (if supported by platform). if null is passed, no badge will be shown.
notify(severity)
open(path, mode)
path: The absolute path of the file to open.
mode: “r” for read, “rw” for read-write, “w” for write.
- Returns a TiFile object
-
file.read()- Returns the contents of the file as a string
-
write(contents)- Writes the string
contentsto the file
- Writes the string
The singleton interface for Desktop functions.
returns an instance of the TiSystemMenu class
returns an instance of the TiUserMenu class
- ti.Window.createWindow
- Returns an instance of the TiUserWindow class
- ti.Window.createWindowOptions
- Returns an instance of the TiWindowOptions class
- get/setTitle
- get/setIcon
- get/setBounds
- get/setHeight
- get/setWidth
- get/setPosition
- hide
- show
- close
h3. TiUserMenu
- addItem
- get/setDisplay
- get/setIcon
- get/setAction
h3. TiSystemMenu
- addItem
- addSeparator
- hide
- show
Used for setting and retrieving window properties