
Creating a Data Strategy 9 3 73
Implementing
the Strategy
notesField, setString
(theDiary. entryNotes ( ) ) ;
//4
Objective-C:
[theDiary setEntryNotes- [notesField string] ] ; //3
[notesField setString- [theDiary entryNotes] ] ; //4
This may seem like a lot of effort, but in practice it is simple.
You will quickly get used to accessors if you are not used to
them now. Your code will be more stable and maintainable,
and it will be easy for you to develop prototypes quickly.
The process of using accessors in this way is like that of fish-
ing a cable through a wall or behind furniture: Its course may
be serpentine, but the end result ...