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
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

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

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

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

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business


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

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