Editing your project’s source files, Opening an existing project – Apple WebObjects 3.5 Tools And Techniques User Manual

Page 21

Advertising
background image

Editing Your Project’s Source Files

21

Opening an Existing Project

To open an existing project from Project Builder:

1. Choose Project

m

Open.

2. In the Open Project panel, navigate to the project folder and click

Open.

3. Select the

PB.project

file and click Open.

To open an existing project from the file system, double-click the

PB.project

file in the project directory. Project Builder launches (if it is not already
running) and opens the project.

Editing Your Project’s Source Files

Every component in your project has a code file whose name is the name of
the component followed by the appropriate extension (

.java

for Java,

.m

for

Objective-C, and

.wos

for WebScript). Your project may use different

languages for different components.

Each component’s code specifies the component’s behavior. Each
component is actually a subclass of the class WOComponent (or
WebComponent, in Java). This class has standard methods (such as

awake

and

init

) that you may want to override (see WebObjects Developer’s Guide for

more information on these methods). You can also write your own methods
and bind them to dynamic elements in your component (see “Working
With Dynamic Elements”, as well as the Dynamic Elements Reference, for
information on binding dynamic elements).

In addition to the component’s code, each project has an application code file
(

Application.java

,

Application.m

, or

Application.wos

) and a session code file (

Session.java

,

Session.m

, or

Session.wos

). These files implement

When you first create your project using the Wizard, you specify the
language you want to use (see “Choosing the Programming Language”).
This language applies to the application and session code, as well as to the
code for your initial component, Main. Other components may be written
in different languages.

The location of your code in the project suitcases varies somewhat
depending on the language used:

Advertising