Corel wordperfect office 2002 ユーザーズマニュアル

ページ / 394
Event-driven
An event-driven interface is one that responds only to specific system or user actions, such as
clicking the mouse button, moving the pointer over an object, or pressing a key. Anything you do
in Paradox generates an event.
Paradox recognizes certain actions or conditions within forms as events. When Paradox detects
that an event has occurred, it executes the method associated with that event. There are
different types of events that are appropriate for different types of objects. For instance, the
pushButton event is recognized by a pushButton object, but not by a graphic object. There are,
however, events that are recognized by all objects, such as the timer event, focus events, and
opening and closing.
Methods
A method is code that defines how an object behaves in response to an event. The ObjectPAL
language is made up of methods and procedures (special code not attached to a specific object).
ObjectPAL methods fall into one of three categories: built-in event methods that are included
with every Paradox object, methods in the ObjectPAL run-time library, and custom methods you
create.
ObjectPAL objects are grouped by type. Objects of a given type have the same properties and
methods. For example, all text files have properties in common and all tables have properties in
common, but the properties of tables and text files are different. Tables and text files are objects
of different types
¾
you use one set of methods to operate on text files, and another to operate
on tables.
Integrated Development Environment (IDE)
When you work with ObjectPAL, you work in the Integrated Development Environment
consisting of the Object Explorer, the Editor, and the Debugger.
You access the Editor through the Object Explorer. The Object Explorer lets you view an object
tree for the current form and provides a developer's interface to properties.
In an ObjectPAL Editor window, you can write, edit, compile, and debug the ObjectPAL code that
is attached to methods on a form, library, or script.
The ObjectPAL Debugger lets you interactively test and trace the execution of commands in your
methods.
Using the Object Explorer
Paradox provides an interactive way of writing code through the Object Explorer. The Object
Explorer has two panes: the Object Tree on the left visually displays the objects on your form and
their relationship to each other; the four tabbed pages on the right list attributes for appearance
and properties, types of methods and events.
Knowing where to place the code is crucial to the successful execution of the method. Where
objects are placed on the form determines how the code is processed. ObjectPAL uses
containership hierarchy, which means that code is processed in a specific order depending on
how deeply the object is contained. For example, the highest level of containership on a form is
at the form level, then the page level, then at the object level (any boxes, fields, or buttons that
are placed on the form). These levels are displayed in the Object Tree.
386
Paradox 10