Reading and writing app properties
Whether you are reading or writing values, all app properties are accessed from the Ti.App.Properties
namespace. In this recipe, we are going to create a number of properties, all with different types, under the first window of our app. Then, we will read them and output their values to the console using a button in the second tab window. We'll also show you how to check the existence of a property using the hasProperty
method.
Getting ready
To prepare for this recipe, open Appcelerator Studio and log in if you have not already done so. If you need to register a new account, you can do it for free directly from within the application. Once you are logged in, click on New Project and the details window for creating a new project will appear. Enter EventsAndProperties as the name of the app, and fill in the rest of the details with your own information.
Pay attention to the app identifier, which is normally written in backwards domain notation (that is, com...