Apple WebObjects 3.5 Tools And Techniques User Manual

Page 61

Advertising
background image

Chapter 3

Working With Dynamic Elements

61

When you choose Add Variable/Method, the following panel opens:

In this panel, you specify:

The name of the key.

Its type.

You can choose the type from the pop-up list or type it in directly. You can
also use the radio buttons to specify whether the variable is an array.

How the key is implemented.

The key can be an instance variable whose value is accessed directly, or a
method that returns a value (not necessarily associated with an instance
variable). You can also create a method that sets the value of an instance
variable.

When you click Add, the key’s name appears in the object browser (below

application

and

session

). To see what was added to your source code, choose View

Source File from the pop-up menu in the object browser. You’ll see something
like the following:

Type the variable name here.

Choose the variable’s type from this pop-up list.

Click one of these buttons if your variable is an array.

Check one or more of these boxes.

Advertising