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
The location of your code in the project suitcases varies somewhat depending on the language used:
- If you use Java or Objective-C, all code files appear in the Classes suitcase. On disk, they live at the top level of the project directory.
- If you use WebScript, the Application.wos and Session.wos files appear in the Resources suitcase. On disk, they live a the top level of the project directory. The component scripts (ComponentName.wos) appear in the component (ComponentName.wo) in the project and on disk.
To save changes in your code, choose File Save.
Note: WebObjects Builder gets information from Project Builder about variables and methods in your code. If you add or delete a variable or method, WebObjects Builder doesn't get the updated information until you save the file.
Table of Contents Next Section