Est. 1993 Intermediate

ObjectPAL

Borland's event-driven, object-based language for Paradox for Windows, where code lives inside the buttons, fields and forms it controls instead of in a separate program

Created by Borland International (Paradox for Windows team)

Paradigm Object-based, event-driven, procedural
Typing Typed variable declarations (var ... endVar); object types such as Table and TCursor
First Appeared 1993
Latest Version Paradox 11 (11.0.0.676, Hot Fix 1 released 7 September 2009)

ObjectPAL — the Object-oriented Paradox Application Language — is the programming language of Paradox for Windows, the relational database that Borland shipped in January 1993 and that Corel still bundles today. It replaced PAL, the scripting language of Paradox for DOS, with something quite different: rather than a script that drives the program from outside, ObjectPAL code is attached directly to the objects on a form — a button, a field, a page, the form itself — and runs when those objects receive events. It brought the HyperCard idea of “code that lives inside the interface” to Windows database development, arriving a couple of months after Microsoft Access and its Access Basic. In the early 1990s the two were the main rival ways to build a Windows database application.

History and Origins

From PAL to ObjectPAL

Paradox was written by Richard Schwartz and Robert Shostak and released for DOS by their company, Ansa Software, in 1985. Its programming language, the Paradox Application Language (PAL), grew out of keystroke recording: a user could record actions and replay them, much as Lotus 1-2-3 macros worked, and then edit and extend the recorded script. Borland bought Ansa in 1987 and developed Paradox for DOS through versions 3.5, 4.0 and 4.5.

When Borland built a Windows version, PAL’s keystroke model no longer fit. A Windows application is driven by mouse clicks and window events, not a fixed sequence of menu keystrokes, and many PAL commands had no Windows equivalent. Borland’s Paradox for Windows team therefore broke compatibility and designed a new language around Windows-style objects and events. The change was controversial with PAL developers, but Borland judged it unavoidable.

A delayed launch

Paradox for Windows was planned for 1992 but slipped to January 1993. By then Microsoft Access, which had debuted at COMDEX in November 1992 at an introductory $99, was already on the market. The New York Times review of 31 January 1993 called Paradox for Windows “worth the wait”. Version 1.0 came on four high-density diskettes with three manuals devoted to the language: Learning ObjectPAL, the ObjectPAL Developer’s Guide and the 877-page ObjectPAL Reference.

Version 1.0 was replaced later in 1993 by Paradox for Windows 4.5, numbered to match Paradox for DOS 4.5. A Workgroup Edition added SQL Links for client/server work.

Design Philosophy

ObjectPAL is built on three ideas.

  1. Code belongs to objects. Each object on a form has a set of built-in methods: event handlers such as pushButton, open, arrive, canDepart and newValue. The developer right-clicks an object, picks Methods, and writes code for the events that object should respond to. There is no main program. Once a handler finishes, the application waits for the next event.

  2. The form is the program. Code is arranged by the visual layout of objects inside one another: a field sits in a record, the record in a table frame, the table frame on a page, the page in a form. Variables and custom methods declared on an outer object are visible to the objects inside it. Wikipedia describes the language as “tightly-bound to the application’s forms”.

  3. Object-based, not fully object-oriented. Objects encapsulate their code, but ObjectPAL has no polymorphism and only limited inheritance, tied to form objects. It is better described as object-based, in the same family as HyperCard’s HyperTalk and Visual Basic, than as a class-based language like Smalltalk or C++.

Key Features

Event handlers

A minimal ObjectPAL program is a button’s pushButton method. This is the example from Tom Campbell’s April 1994 COMPUTE! column:

method pushButton(var eventInfo Event)
  msgInfo("Hello", "Hello, world.")
endMethod

Every built-in method receives an eventInfo parameter describing the event. A handler can change the outcome by setting an error code. This field-validation handler blocks the cursor from leaving a field until the value passes a check:

method canDepart(var eventInfo MoveEvent)
  if self.value < 0 then
    eventInfo.setErrorCode(CanNotDepart)
    beep()
    msgInfo("Invalid entry", "The value cannot be negative.")
  endIf
endMethod

Database operations as language features

As a database language, ObjectPAL lets programs create and query tables directly. Campbell’s column shows a table created entirely in code:

method pushButton(var eventInfo Event)
  var
    Contax  Table
  endVar

  Contax = create "contax.db"
    with "Last Name"  : "A25",
         "First Name" : "A20",
         "ID Number"  : "S"
    key "Last Name"
  endCreate
endMethod

The type codes are Paradox field types: A25 is a 25-character alphanumeric field and S is a short integer. Beyond tables, ObjectPAL has TCursor objects for moving through and editing records without showing them on screen, and query objects for running Paradox’s query-by-example from code.

Language summary

AspectObjectPAL
Unit of codeMethods attached to form objects, plus custom methods and procedures
Block styleKeyword-delimited: method ... endMethod, var ... endVar, if ... endIf, while ... endWhile
Data typesTyped declarations such as String, Number, SmallInt, plus object types such as Table and TCursor
Execution modelEvent-driven; the Paradox environment dispatches events to objects
ReuseLibraries of shared code that several forms can call
DeploymentInside Paradox, or with the separately sold Paradox Runtime
ToolsIntegrated editor and debugger with breakpoints and single-stepping

The syntax looks like BASIC: keyword-terminated blocks, msgInfo and msgQuestion for dialog boxes, and dot notation for methods (self.value, tc.deleteRecord()). Comments start with a semicolon.

A large library

ObjectPAL’s power was in its runtime library more than its grammar. Reviewing version 1.0 for COMPUTE! in September 1993, Campbell called it “such a big language that no tutorial could cover all its facets” and advised readers to browse the ObjectPAL Reference to learn it. Later versions kept adding to the library. A January 1996 first-look review of Paradox 7 reported “over 100 new methods, including 10 that provide MAPI functions like Send Mail”, along with ObjectPAL control of OCX controls.

Evolution

VersionYearObjectPAL-related changes
Paradox for Windows 1.01993Language introduced
Paradox for Windows 4.51993New and enhanced methods (shipped as a NEWPAL.DB reference table), SQL-specific methods in the Workgroup Edition
Paradox 5.0 for Windows1994OLE 2.0; Developer Tools (January 1995) add an ObjectPAL Browser that gathers an object’s source into one text file
Paradox 71995Windows 95/NT release; editor gains colour syntax highlighting and keyboard recording; 100+ new methods; OCX support
Corel Paradox 81997First Corel release, also in WordPerfect Suite 8 Professional
Corel Paradox 9 and 10late 1990s–2001Paradox 10 announced alongside WordPerfect Office 2002 in 2001
Paradox 112000sFinal line; Hot Fix 1 (11.0.0.676) in September 2009 is the last update, apart from a 2010 Runtime Hot Fix

Paradox also changed hands. Borland bundled Paradox 5.0 into Novell’s PerfectOffice Professional in 1994, and in 1996 Corel took over its development, marketing and support under a licensing agreement with Borland. Borland kept the Borland Database Engine (BDE) underneath it and moved its own effort to Delphi. Under Corel, Paradox became a component of the WordPerfect Office Professional editions.

Current Relevance

ObjectPAL is effectively frozen. Corel’s patch list shows Paradox Hot Fix 1, build 11.0.0.676, released 7 September 2009, as the last Paradox update; only a Runtime Hot Fix for the same build followed, in August 2010. Every later WordPerfect Office Professional edition has carried the same build, and Corel’s product page still lists “the Paradox database management system” among the suite’s tools. So ObjectPAL remains available to buy, but it has seen no new development for more than fifteen years.

Most of its users still keep legacy applications running. Paradox tables and ObjectPAL forms were reportedly common in small businesses, government offices and departmental IT through the 1990s. Some of those applications are still maintained, often until they can be migrated, and community sites such as Prestwood’s ObjectPAL knowledge base keep the old idioms documented.

Why It Matters

ObjectPAL is a good example of an idea that now seems obvious: in a GUI application, code should be organised around the objects the user sees and the events they produce. HyperCard had shown this on the Macintosh, and Visual Basic had brought it to general Windows programming in 1991. Paradox for Windows built it into a relational database with a property inspector, right-click access to an object’s methods, and events dispatched through the nesting of objects on a form.

Its history is also a cautionary tale. Breaking with PAL cost Borland the loyalty of part of its DOS developer base just as Microsoft Access arrived with a lower price and a BASIC-like language that many found closer to PAL than ObjectPAL was. Within a few years desktop databases were folded into office suites, and ObjectPAL survived as a bundled component rather than a product of its own. Even so, Paradox users built business software in ObjectPAL that in some cases has outlived the company that created the language.

Timeline

1985
Ansa Software releases Paradox for DOS, whose Paradox Application Language (PAL) is the keystroke-oriented predecessor of ObjectPAL
1987
Borland acquires Ansa Software and with it Paradox and PAL
1993
Paradox for Windows 1.0 ships in January, about a year late, introducing ObjectPAL with three manuals: Learning ObjectPAL, the ObjectPAL Developer's Guide and the ObjectPAL Reference
1993
Paradox for Windows 4.5 follows later in the year, its number matched to Paradox for DOS 4.5, with a Workgroup Edition adding SQL Links to InterBase, Sybase/Microsoft SQL Server and Oracle
1994
Paradox 5.0 for Windows launches in August with OLE 2.0 support and is bundled into Novell's PerfectOffice Professional
1995
Borland ships Paradox 5.0 Developer Tools in January, including an ObjectPAL Browser, and a runtime licence granting unlimited distribution of ObjectPAL applications
1995
Paradox 7 for Windows 95 and Windows NT ships in December; ObjectPAL gains over 100 new methods (including MAPI mail calls) and an editor with colour syntax highlighting
1996
Corel takes over development, marketing and support of Paradox from Borland under a licensing agreement
1997
Corel releases Corel Paradox 8, also bundled in Corel WordPerfect Suite 8 Professional
2009
Corel issues Paradox Hot Fix 1 (build 11.0.0.676) on 7 September 2009, the last update to Paradox itself (a matching Runtime Hot Fix followed in August 2010); later WordPerfect Office Professional editions keep shipping the same build

Notable Uses & Legacy

Paradox for Windows applications

ObjectPAL was the only way to program Paradox for Windows: event handlers attached to forms, buttons and fields turned interactive tables into complete data-entry applications

Runtime distribution

Borland's separately sold Paradox Runtime let developers ship finished ObjectPAL applications to users who did not own Paradox; the Paradox 5.0 Runtime (priced at $500 in 1995) carried an unlimited distribution licence

Office-suite database scripting

Through Novell PerfectOffice Professional and later Corel's WordPerfect Office Professional editions, ObjectPAL became the macro and application language of the suite's database component

Client/server front ends

With Borland SQL Links, ObjectPAL forms worked as front ends to InterBase, Sybase/Microsoft SQL Server and Oracle databases from the 4.5 Workgroup Edition onward

Language Influence

Influenced By

Running Today

Run examples using the official Docker image:

docker pull
Last updated: