This chapter describes the processes of two fundamentally important, yet deceptively simple, parts of the Titanium framework. In this chapter, we'll explain how to go about creating and reading app properties so that you can store data that is accessible from any part of your application. This is similar to how session data or cookies would work if you were building a web-based app.
We'll also go into further detail on events, including a selection of those fired by the various components in Titanium, and custom events that you can define yourself.
Application properties are used for storing data in key/value pairs. These properties can persist between your app's windows, and even beyond single application sessions, much like a website cookie. You can use any combination of upper case or lower case letters and numbers in a property name, but you should mix them with care as JavaScript is case-sensitive. In this regard, Myname
, myname
, and MYNAME
would be three very different properties...