The global object representing the currently running instance of dBASE Plus.

Syntax

The _app object is automatically created when you start dBASE Plus.

Properties

The following tables list the properties, events and methods of the _app object.

Property

Default

Description

allowDEOExeOverride

true

Whether a dBASE Plus application checks for external objects

allowYieldOnMsg

false

Whether dBASE Plus checks for messages during progam execution

baseClassName

APPLICATION

Identifies the object as an instance of the dBASE Plus application

charSet

 

The current global character set

className

(APPLICATION)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

databases

Object array

An array containing references to all database objects used by the Navigator

ddeServiceName

DBASE

The name used to identify each instance of dBASE Plus when used as a DDE service

detailNavigationOverride

0 - Use rowset’s detail settings

Controls whether or not a rowset’s navigateMaster and navigateByMaster properties are overridden

errorAction

4 - Show Error Dialog

Default action to be taken when an error is encountered

errorHTMFile

error.htm

Filename of an HTM file template (runtime web apps only)

errorLogFile

PLUSErr.log

Filename of the error log file to be used when the _app object's errorAction property is set to 2,3, or 5.

errorLogMaxSize

100

Approximate maximum size of the error log file (kilobytes)

errorTrapFilter

0 - Trap all errors

Enables, or disables, the detection of certain kinds of errors.

exeName

 

Drive, path and filename of the currently running instance of PLUS.exe or a dBASE Plus application .exe.

frameWin

Object

The dBASE Plus MDI frame window

insert

true

Whether text typed at the cursor is inserted or overwrites existing text

language

 

The currently used display language in the design and runtime environments. Read only.

lDriver

 

The current global language driver

printer

Object

Configuration properties for the default printer

session

Object

The default Session object

sourceAliases

Object array

A read-only array containing references to all Source Aliases defined in the PLUS.ini.

speedBar

true

Whether to display the default toolbar.

statusBar

true

Whether to display the status bar at the bottom of the MDI frame window

 

terminateTimerInterval

5000 milliseconds

Determines the amount of time, in milliseconds, between the closing of an application .exe and the removal of PLUSrun.exe from the Web servers memory

web

false

Indicates whether an application .exe was built using the WEB parameter

Event

Parameters

Description

onInitiate

<topic expC>

When a client application requests a DDE link with dBASE Plus as the server, and no DDETopic object for the specified topic exists in memory.

Method

Parameters

Description

addToMRU( )

<filename>
<launchMode>

When called, adds a file to the “most recently used” files list located on the “Files | Recent Files” and “Files | Recent Projects” menus.

executeMessages( )

 

When called, handles pending messages during execution of a processing routine.

themeState( )

 

Indicates whether themes are in use for the application.

Description

Use _app to control and get information about the currently running instance of dBASE Plus. The insert property controls the insert or overwrite behavior of typed text in all forms, the Source Editor, and the Command window. It is toggled by pressing the Insert key. You may show or hide the default toolbars and the status bar. To control other aspects of the main application window, use the _app.frameWin object.

The databases array contains references to all databases opened by the Navigator. The default database is the first element in that array. The session property points to the default session. Therefore _app.databases[1].session and _app.session point to the same object.

To use dBASE Plus as a DDE server, set the ddeServiceName to a unique identifier if there is more than one instance of dBASE Plus running or if you want your application to have a specific DDE service name other than the default "DBASE", then assign an onInitiate event handler to handle the service request.

The _app object is also used to store important global values and other objects used by your application. Dynamically creating properties of _app is preferable to creating public variables.

Variables may be inadvertently released or conflict with other variable names.

Objects referenced only in variables cannot communicate with each other using object-oriented techniques. Objects attached to the same parent object, in this case _app, can.