Skip to Main Content
Objective-C® For Dummies®
book

Objective-C® For Dummies®

by Neal Goldstein
October 2009
Beginner content levelBeginner
456 pages
8h 59m
English
For Dummies
Content preview from Objective-C® For Dummies®

Chapter 15. Show Me the Data

In This Chapter

  • Creating and using property lists

  • How dictionaries work

  • Updating dictionaries and plists

  • Having a property list object (array) write itself to a file

In Chapter 1, I explain that a computer program is a set of instructions that perform operations on data. While this is what you have been steadily doing since Chapter 1 — coding statements that operate on data — all of the data you have been working with so far has been "hard coded" into the program.

Once you put on the user interface, of course, that will change. The user will be entering transactions, and you will be processing them, and probably storing both the transactions and the results as well. For example, you'll want to save all the credit card transactions to reconcile them against your statement when you get home, and you definitely want the ability to store what's left of your budget after a series of transactions so that every time you restart the program, you don't start with your original budget (well, it would be nice if you could do that, but I guess that's not realistic).

In this chapter, I will show you how to store what's left of your budget after a series of transactions to a file, and then read that file when the application starts up again. This will illustrate some of the ways you can save data. But before I show you that, I want to make you aware of another kind of data you need for your program, application-based data.

Understanding Application-Based Data

As I look at ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Objective-C

Objective-C

Jiva DeVoe
Cocoa in a Nutshell

Cocoa in a Nutshell

Michael Beam, James Duncan Davidson

Publisher Resources

ISBN: 9780470522752Purchase book