Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > WebObjects Developer's Guide


Table of Contents Previous Section

Specifying the Project Search Path

When you use Project Builder to build an application, it places the built application inside of the project directory. For WebObjects applications after you build the project, you'll have a .woa directory inside of the project directory. This is typically the copy of the application you want to debug. If you use this default setup, WebObjects uses the components, script files, images, and other resources from the project directory instead of the copies inside of the .woa directory while you debug the project. This way, you can edit scripts (.html, .wod, .wos files) or change image files in your project without having to rebuild or even restart the application.

Sometimes, you want to debug framework code as well as application code. Other times, you might have moved the .woa directory outside of the project directory but you still want to use the project's copies of resource files instead of those in the .woa directory's. In these cases, you should set the NSProjectSearchPath user default. NSProjectSearchPath should point to the directory that contains all of your projects. WebObjects looks in the directories specified by NSProjectSearchPath for a project that has the same name as the application or framework being loaded (note that the project name is defined inside PB.project and is not the project's directory name). If it finds a project, it uses the resources from the project directory instead of the resources inside the .woa directory.

You can change NSProjectSearchPath on a command line as follows:

% defaults write NSGlobalDomain NSProjectSearchPath 
'("someDirectory", "someOtherDirectory", ...)'

Table of Contents Next Section