background image
2.
Control-drag a connection from the Exchange Rate text field to the Dollars to Convert text field, as shown
in Figure 4-11. (To Control-drag, press Control, then drag the connection line.)
Figure 4-11
Connecting
nextKeyView
outlets in Interface Builder
3.
Select
nextKeyView
under Outlets. This identifies the next object to respond to events after the Tab
key is pressed.
4.
Repeat the same procedure, going from the Dollars to Convert text field to the Exchange Rate text field.
Now that you've set up tabbing between text fields, you must tell Currency Converter which text field will
be selected first. You do this by setting an
initialFirstResponder
.
Set the First Responder Text Field
The
initialFirstResponder
is the default selected object when your application starts. If you do not set
this outlet, the window sets a key loop and picks a default
initialFirstResponder
for you (not necessarily
the same as the one you would have specified).
To set the
initialFirstResponder
outlet for the Currency Converter window:
38
Refining the Layout and View Functionality
2007-10-31 | © 2007 Apple Inc. All Rights Reserved.
CHAPTER 4
Defining the View: Building the User Interface