O'Reilly logo

Creating Mobile Apps with Appcelerator Titanium by Christian Brousseau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Wiring the preference service to the UI

Now that we have our preference service in place, we can now add a functionality to our portfolio window, knowing that the changes done by our user won't be lost.

Adding a new stock to the list

Probably the most important feature in our application is the ability to add new stocks. Let's start with this one. We will add a click event handler on the btnAddStock button. Inside this handler, we will create a new Stock object using the symbol (in upper case), and quantity entered by the user. Once our stock object is created, we will add it to the table view underneath using the addCustomRow function. We will create this function in just a moment, but for now, remember that it takes two parameters, the table view ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required