##The Titanium Object
Note: Since it's simple to write to the Titanium object, you should be careful not to overwrite Titanium namespaces and methods, unless you know what you're doing.
Almost all instantiated objects in Titanium are accessor-objects. This means that properties can be accessed and modified in two styles. For example, take this use use of API.Application.getName():
Likewise a similar method can be used for modifiers:
Titanium provides an API for logging. There are two supported methods.
Note: You can view the log output via the web inspector (or a terminal window if you launched your app from the command line). The Web Inspector only logs WARN messages or higher.
If you want to control the level of logging that is displayed via stdout, you can set the logging level.
Titanium allows you to access environment variables via the Titanium.API.getEnvironment function. The object returned by this function is live representation of all environment variables, which allows you to query and update the environment easily.
Many objects in Titanium can fire and handle events. Sometimes you may need to inercept all events after they've bubbled up to the top-level object. This is possible by installing an event handler on the Titanium object.
Not only will Titanium.API.addEventListener listen for events fired with Titanium.API.fireEvent, but it will also listen for events originating from all Titanium objects (unless preventDefault or stopPropagation was called on that event).