home / experts / javascript / column49 |
|
Manipulating Projects, Part IIn this page we'll teach you how to use HomeSite's Projects via JavaScript. First, familiarize yourself with the Project concept. A project is a collection of files. You can add to and remove files from a project. Files belonging to a certain project need not reside in the same directory and a single file can belong to several projects. The advantage of using projects is that you can operate on a project as a single entity. One of the most powerful command is the Upload Project that allows you to upload all project's files to a server with a single command. The Project configuration file has an extension of
Once you created your projects, you can activate one of them via the pulldown menu at the top of the Projects Window. The three buttons next to the pulldown menu are for creating a new project, opening an existing project, and for uploading a project to a server:
Right clicking on the active project opens the Project menu from which you can access many immediate commands such as adding files to the project, opening all its files, etc. Now that you are familiar with HomeSite's Projects, the following Application Object's property and methods will be more intuitive.
This property returns the currently-active project. If the current project is
will yield the following window:
Adds the given file (
Closes the active project. It also closes all open files if the given flag (
Opens a given project. The parameter should include the full file name, as in the following example:
You can also pass an empty string as a parameter to this method and force the Open Project dialog. |
Produced by Yehuda Shiran and Tomer Shiran
Created: September 27, 1999
Revised: September 27, 1999
URL: http://www.webreference.com/js/column49/projects1.html