Property and Event Reference



Chapter 1   About Properties and Events

This chapter describes properties and events in SilverStream, including:

Understanding properties and events   Top of page

You use properties and events to define the features and behaviors of objects you develop in the SilverStream Designers. They are part of the visual-programming toolset that SilverStream provides and their purpose is to give you a productive, consistent way to manipulate more complex and varied implementation details.

How they relate to the SilverStream API   Top of page

Properties and events are separate from the SilverStream API. The properties and events you specify for a particular Designer object turn into metadata that tells SilverStream how to generate and operate that object. Often this results in method calls to a corresponding class in the SilverStream API, but not always.

A closer look at properties   Top of page

Properties are attributes that you set at design time for a particular Designer object, such as a form or page. You specify them in the Designer's Property Inspector dialog. For instance, here are the properties for a label control on a page:

Overriding properties at runtime

Because properties are not part of the SilverStream API, you can't access them directly at runtime like instance variables (fields). But for many properties, the API does provide accessor (get and set) methods that enable you to read and modify those property values.

Example

In the previous illustration, the Enable HTML Generation property is checked at design time to specify that you want the HTML for the lblSamples control generated on the page. But suppose you need to do a runtime test (maybe based on user authority) and dynamically turn off HTML generation of that label.

If you look at the API methods for the corresponding SilverStream class (AgpLabel), you'll find you can code:

A closer look at events   Top of page

Events correspond to event-handler methods that the Designers provide for forms, pages, and other objects. To perform the processing you want for a particular object, you use the Programming Editor to write code in its appropriate event-handler methods. For instance, here are the events for a button control on a form:

Notice that the actionPerformed event for the Save button corresponds to the event-handler method handle_Save_actionPerformed(). The code you write here will execute when a user clicks that button.

Under the covers

Events are implemented in a couple of ways:

Finding properties and events   Top of page

You can use the SilverStream help system to get reference information about the properties and events for:

Here's how to find that information:

If you

See

Know the name of the property or event you want

One of these chapters in the Property and Event Reference:

Want a list of the properties and events associated with a particular class in the SilverStream API

The documentation for that class in the SilverStream API help

Want a list of the properties and events for a particular Designer object (such as a form, page, or control)

This chapter in the General Reference: Designer Objects and their API Classes

You can use it to:

  1. Find the SilverStream API class that corresponds to your Designer object

  2. Go to the documentation for that class in the SilverStream API help and see the list of its associated properties and events






Copyright © 2000, SilverStream Software, Inc. All rights reserved.