spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column48


Using JavaScript in HomeSite 4.0, Part I

Developer News
OpenOffice 3.2 Lands Amid Critical Changes
Red Hat, IBM Firmly in KVM Virtualization Camp
Red Hat Talks Up Open Source Cloud Plans

The Application Object's Properties

In order to automate various HomeSite related tasks, you'll need to familiarize yourself with the visual tools object model. The main object is the Application object. This object contains two important child objects, the ActiveDocument object and the DocumentCache object. Using these three objects, you should be able to write scripts to run your most common tasks. In addition, the Application object contains a number of toolbar-related functions, enabling you to create toolbars dynamically.

The Application object includes various properties and methods that relate to the HomeSite environment. Since you will need this object in every script, we suggest that you always start by creating a variable holding the Application object reference. This technique is more efficient (in terms of performance and convenience) than continually referencing the Application object directly. Let's take another look at the script we presented earlier in the column:

var app = Application;
function Main() {
  app.CloseAll(true);
}

The first statement assigns the Application object to a variable named app, and the entire script (a very short one, in this case) refers to that variable rather than accessing the Application object directly. The following diagram illustrates the object model in HomeSite 4.0:

The Object Model

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

webref The latest from WebReference.com Browse >
Search Engine Optimization: Selecting and Embedding Keywords · Are Google's Language Translation Web Services Ready for Prime Time? · Installing and Using Meeplace, the Business Review CMS
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
IBM DB2 10 for z/OS: Justifying the Upgrade · Living La Vida Colo: Choosing the Right Colocation Facility · FTC Concerns over Social Media Privacy Linger


Created: September 13, 1999
Revised: September 13, 1999

URL: http://www.webreference.com/js/column48/application.html