TDABaseEcmaScriptProvider

Overview

Base class for TDAActiveScriptProvider and TDASpiderMonkeyScriptProvider that implement Business Rules Scripting feature.

This class provides properties and events common for above components.

Usage

See about how to use TDABaseEcmaScriptProvider descendants at the article Business Rules Scripting.

Location

 

constructor Create  override

Creates a new instance.

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner.

AfterCommit

Called just after a transaction (set of insert/update/delete) has been committed.

procedure AfterCommit

AfterExecuteCommand

Called after an sql command is executed.

procedure AfterExecuteCommand(aSQL: string; aCommandName: string; aParameters: DataParameterArray; aRowsAffected: integer)

Parameters:

  • aSQL: sql
  • aCommandName: command name
  • aParameters: parameters
  • aRowsAffected: rows affected

AfterGetData

Called after a request for data is sent.

procedure AfterGetData(aTables: StringArray; aRequestInfo: TableRequestInfoArray)

Parameters:

  • aTables: table's names
  • aRequestInfo: request infos

AfterProcessDelta

Called for each Delta on the server after it's applied. Any changes done to the delta will only be sent back to the client.

procedure AfterProcessDelta(aDelta: IDADelta)

Parameters:

  • aDelta: delta

AfterProcessDeltaChange

Called after each change is applied to the database.

procedure AfterProcessDeltaChange(aDelta: IDADelta; aChange: TDADeltaChange; aWasRefreshed: Boolean)

Parameters:

  • aDelta: delta
  • aChange: change
  • aWasRefreshed: mode

AfterRollback

Called just after a transaction (set of insert/update/delete) is rolled back (canceled).

procedure AfterRollback

Assign  override    (declared in TDAScriptingProvider)

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

BeforeCommit

Called just before a transaction (set of insert/update/delete) has been committed.

procedure BeforeCommit

BeforeDelete

Called when the client (or server depending on the schema settings) deletes a record.

procedure BeforeDelete(aRow: IDARowHelper)

Parameters:

  • aRow: record

BeforeExecuteCommand

Called before an SQL command is executed.

procedure BeforeExecuteCommand(aSQL: string; aCommandName: string; aParameters: DataParameterArray)

Parameters:

  • aSQL: sql command
  • aCommandName: command's name
  • aParameters: parameters

BeforeGetData

Called before a request for data is sent.

procedure BeforeGetData(aTables: StringArray; aRequestInfo: TableRequestInfoArray)

Parameters:

  • aTables: table's names
  • aRequestInfo: request infos

BeforePost

Called before a change to a record is accepted.

procedure BeforePost(aRow: IDARowHelper)

Parameters:

  • aRow: record

BeforeProcessDelta

Called for each delta on the server before it's applied. Any changes done to the delta will be posted to the database.

procedure BeforeProcessDelta(aDelta: IDADelta)

Parameters:

  • aDelta: delta

BeforeProcessDeltaChange

Called before each change is applied to the database. Any implementation should return the current value of canRemove unless it changed.

procedure BeforeProcessDeltaChange(aDelta: IDADelta; aChange: TDADeltaChange; aWasRefreshed: Boolean; var aCanRemove: Boolean)

Parameters:

  • aDelta: delta
  • aChange: change
  • aWasRefreshed: mode
  • aCanRemove: specifies that this change can be removed from sending back to client

BeforeRollback

Called just before a transaction (set of insert/update/delete) is rolled back (canceled).

procedure BeforeRollback

Context

Represents specified contextual information about current instance.

property Context: IDAScriptContext read write

CreateTransaction

Called when a new transaction is created to fetch or update records.

procedure CreateTransaction

DoContextChangedArgs  protected virtual

Fires OnContextChanged event.

procedure DoContextChangedArgs(aEngine: TDAEcmaScriptEngine; aContext: IDAScriptContext; aServerContext: IDAServerScriptContext; IsSubscript: Boolean; aSubScript: string)

Parameters:

  • aEngine:
  • aContext:
  • aServerContext:
  • IsSubscript:
  • aSubScript:

DoError  protected virtual

Fires OnError event

procedure DoError(aError: ScriptException)

Parameters:

  • aError: Exception

DoLog  protected virtual

Fires OnLog event

procedure DoLog(aMessage: string)

Parameters:

  • aMessage: Message

Engine

Represents native engine components that gives additional functionality.

For example, Engine object can be used to set custom functions as follows:

ScriptProvider.Engine.Variables.SetVariable('Base64GUID', Base64GUID);

property Engine: TDAEcmaScriptEngine read write

Fail  protected

Raises the specified exception.

function Fail(args: array of variant): variant

Parameters:

  • args: Specified array of parameters.

GetEngineClass  protected virtual abstract

Returns default engine class for current script provider.

function GetEngineClass: TDAEcmaScriptEngineClass

GetLDAWrapperClass  protected virtual abstract

Specifies LDAWrapper class.

function GetLDAWrapperClass: TDAEcmaLDAWrapperClass

GetNative  protected

Implements IDANativeAccess method. Returns Self

function GetNative: TObject

GetWhereBuilderClass  protected virtual abstract

Specifies WhereBuilderMethods class.

function GetWhereBuilderClass: TDAEcmaWhereBuilderMethodsClass

HasAfterCommit

Returns true if AfterCommit script is present. In other cases returns false.

property HasAfterCommit: Boolean read write

HasAfterExecuteCommand

Returns true if AfterExecuteCommand script is present. In other cases returns false.

property HasAfterExecuteCommand: Boolean read write

HasAfterGetData

Returns true if AfterGetData script is present. In other cases returns false.

property HasAfterGetData: Boolean read write

HasAfterProcessDelta

Returns true if AfterProcessDelta script is present. In other cases returns false.

property HasAfterProcessDelta: Boolean read write

HasAfterProcessDeltaChange

Returns true if AfterProcessDeltaChange script is present. In other cases returns false.

property HasAfterProcessDeltaChange: Boolean read write

HasAfterRollback

Returns true if AfterRollback script is present. In other cases returns false.

property HasAfterRollback: Boolean read write

HasBeforeCommit

Returns true if BeforeCommit script is present. In other cases returns false.

property HasBeforeCommit: Boolean read write

HasBeforeDelete

Returns true if BeforeDelete script is present. In other cases returns false.

property HasBeforeDelete[aTable: string]: Boolean read write

HasBeforeExecuteCommand

Returns true if BeforeExecuteCommand script is present. In other cases returns false.

property HasBeforeExecuteCommand: Boolean read write

HasBeforeGetData

Returns true if BeforeGetData script is present. In other cases returns false.

property HasBeforeGetData: Boolean read write

HasBeforePost

Returns true if BeforePost script is present. In other cases returns false.

property HasBeforePost[aTable: string]: Boolean read write

HasBeforeProcessDelta

Returns true if BeforeProcessDelta script is present. In other cases returns false.

property HasBeforeProcessDelta: Boolean read write

HasBeforeProcessDeltaChange

Returns true if BeforeProcessDeltaChange script is present. In other cases returns false.

property HasBeforeProcessDeltaChange: Boolean read write

HasBeforeRollback

Returns true if BeforeRollback script is present. In other cases returns false.

property HasBeforeRollback: Boolean read write

HasCreateTransaction

Returns true if CreateTransaction script is present. In other cases returns false.

property HasCreateTransaction: Boolean read write

HasOnNewRow

Returns true if OnNewRow script is present. In other cases returns false.

property HasOnNewRow[aTable: string]: Boolean read write

HasProcessError

Returns true if ProcessError script is present. In other cases returns false.

property HasProcessError: Boolean read write

HasUnknownSqlMacroIdentifier

Returns true if onUnknownSqlMacroIdentifier script is present. In other cases returns false.

property HasUnknownSqlMacroIdentifier: Boolean read write

HasValidateCommandAccess

Returns true if ValidateCommandAccess script is present. In other cases returns false.

property HasValidateCommandAccess: Boolean read write

HasValidateDataTableAccess

Returns true.

property HasValidateDataTableAccess: Boolean read write

HasValidateDirectSQLAccess

Returns true.

property HasValidateDirectSQLAccess: Boolean read write

InitializeEngine  protected virtual

Used for additional initialization of engine.

procedure InitializeEngine(aEngine: TDAEcmaScriptEngine)

Parameters:

  • aEngine: Engine

LoadScript

Loads specified script.

procedure LoadScript(aScript: string)

Parameters:

  • aScript: Specified script.

LogMessage  protected

Logs specified information.

function LogMessage(args: array of variant): variant

Parameters:

  • args: Specified collection with information need to log.

NewGuid  protected

Creates and returns new Guid value.

function NewGuid(args: array of variant): variant

Parameters:

  • args: are not used.

NewGuidString  protected

Creates and returns new Guid value as string.

function NewGuidString(args: array of variant): variant

Parameters:

  • args: are not used.

OnContextChanged

Fires when Context property is changing.

property OnContextChanged: TDABaseEcmaScriptContextChangedArgs read write
delegate: procedure OnContextChanged(aEcmaScriptProvider: TDABaseEcmaScriptProvider; aEngine: TDAEcmaScriptEngine; aContext: IDAScriptContext; aServerContext: IDAServerScriptContext; IsSubscript: Boolean; aSubScript: string)

OnError

Fires when Error is happed.

property OnError: TDABaseEcmaScriptErrorEvent read write
delegate: procedure OnError(aEcmaScriptProvider: TDABaseEcmaScriptProvider; aError: ScriptException)

OnLog

Fires when script execute function LogMessage to log specified information.

property OnLog: TDABaseEcmaScriptLogEvent read write
delegate: procedure OnLog(aEcmaScriptProvider: TDABaseEcmaScriptProvider; aMessage: string)

OnNewRow

Called when creating new rows, it can be used to initialize new records.

procedure OnNewRow(aRow: IDARowHelper)

Parameters:

  • aRow: Row

ProcessError

Called when an error occurs during applying a change. Should return the current value of aCanContinue, or false to stop trying the next change.

procedure ProcessError(aDelta: IDADelta; aChange: TDADeltaChange; var aCanContinue: Boolean; var aError: Exception)

Parameters:

  • aDelta: Delta instance containing failed data change
  • aChange: DeltaChange that cannot be applied to the database
  • aCanContinue: Flag indicating wthether Data Abstract should process other DeltaChange instances instead of rolling back the transaction immediately
  • aError: Exception raised by the data change attempt

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned RO components.

procedure ROFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Disables destruction notification for specified RO component.

procedure RORemoveFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

ScriptableComponent    (declared in TDAScriptingProvider)

property ScriptableComponent: TScriptableComponent read write

ScriptObjectToVariant  protected virtual

Used for convertation of Script object into variant object.

TDAActiveScriptProvider converts ScriptObject into COM compatible object.

function ScriptObjectToVariant(aObj: TDAEcmaBaseScriptObject): variant

Parameters:

  • aObj: Object

SubScripts

Represent the whole list of Scripts for every data table in the TDASchema.

property SubScripts: TStringList read write

SupportsLanguage

Returns true if aName equals: js, javascript, jscript, ecmascript, rsljavascript. Otherwise returns false.

function SupportsLanguage(aName: string): Boolean

Parameters:

  • aName: specified language name.

UnknownSqlMacroIdentifier

Called when an unknown macro is used from within an sql statement.

procedure UnknownSqlMacroIdentifier(aIdentifier: string; var aValue: string)

Parameters:

  • aIdentifier: identifier.
  • aValue: value.

ValidateCommandAccess

Called before a command is executed. Should return true if access is allowed.

procedure ValidateCommandAccess(aName: string; aParameterNames: array of string; aParameterValues: array of Variant; var aAllowed: Boolean)

Parameters:

  • aName: command name.
  • aParameterNames: parameter names
  • aParameterValues: parameter values
  • aAllowed: contains access state

ValidateDataTableAccess

Called during validation of request (fetching) for a data table. Should return true if access to that table should be allowed.

procedure ValidateDataTableAccess(aName: string; aParameterNames: array of string; aParameterValues: array of Variant; var aAllowed: Boolean)

Parameters:

  • aName: table name
  • aParameterNames: parameter names
  • aParameterValues: parameter values
  • aAllowed: contains access state

ValidateDirectSQLAccess

Called when a user executes raw sql, generally this is disabled but can be allowed by returning true here.

procedure ValidateDirectSQLAccess(aSQL: string; aParameterNames: array of string; aParameterValues: array of variant; var aAllowed: Boolean)

Parameters:

  • aSQL: raw sql.
  • aParameterNames: parameter names
  • aParameterValues: parameter values
  • aAllowed: contains access state

VariantArrayToEcmaVariant  protected virtual

Converts array of variant into variant.

function VariantArrayToEcmaVariant(args: array of Variant): Variant

Parameters:

  • args: array of variant

 

Context

Represents specified contextual information about current instance.

property Context: IDAScriptContext read write

Engine

Represents native engine components that gives additional functionality.

For example, Engine object can be used to set custom functions as follows:

ScriptProvider.Engine.Variables.SetVariable('Base64GUID', Base64GUID);

property Engine: TDAEcmaScriptEngine read write

HasAfterCommit

Returns true if AfterCommit script is present. In other cases returns false.

property HasAfterCommit: Boolean read write

HasAfterExecuteCommand

Returns true if AfterExecuteCommand script is present. In other cases returns false.

property HasAfterExecuteCommand: Boolean read write

HasAfterGetData

Returns true if AfterGetData script is present. In other cases returns false.

property HasAfterGetData: Boolean read write

HasAfterProcessDelta

Returns true if AfterProcessDelta script is present. In other cases returns false.

property HasAfterProcessDelta: Boolean read write

HasAfterProcessDeltaChange

Returns true if AfterProcessDeltaChange script is present. In other cases returns false.

property HasAfterProcessDeltaChange: Boolean read write

HasAfterRollback

Returns true if AfterRollback script is present. In other cases returns false.

property HasAfterRollback: Boolean read write

HasBeforeCommit

Returns true if BeforeCommit script is present. In other cases returns false.

property HasBeforeCommit: Boolean read write

HasBeforeDelete

Returns true if BeforeDelete script is present. In other cases returns false.

property HasBeforeDelete[aTable: string]: Boolean read write

HasBeforeExecuteCommand

Returns true if BeforeExecuteCommand script is present. In other cases returns false.

property HasBeforeExecuteCommand: Boolean read write

HasBeforeGetData

Returns true if BeforeGetData script is present. In other cases returns false.

property HasBeforeGetData: Boolean read write

HasBeforePost

Returns true if BeforePost script is present. In other cases returns false.

property HasBeforePost[aTable: string]: Boolean read write

HasBeforeProcessDelta

Returns true if BeforeProcessDelta script is present. In other cases returns false.

property HasBeforeProcessDelta: Boolean read write

HasBeforeProcessDeltaChange

Returns true if BeforeProcessDeltaChange script is present. In other cases returns false.

property HasBeforeProcessDeltaChange: Boolean read write

HasBeforeRollback

Returns true if BeforeRollback script is present. In other cases returns false.

property HasBeforeRollback: Boolean read write

HasCreateTransaction

Returns true if CreateTransaction script is present. In other cases returns false.

property HasCreateTransaction: Boolean read write

HasOnNewRow

Returns true if OnNewRow script is present. In other cases returns false.

property HasOnNewRow[aTable: string]: Boolean read write

HasProcessError

Returns true if ProcessError script is present. In other cases returns false.

property HasProcessError: Boolean read write

HasUnknownSqlMacroIdentifier

Returns true if onUnknownSqlMacroIdentifier script is present. In other cases returns false.

property HasUnknownSqlMacroIdentifier: Boolean read write

HasValidateCommandAccess

Returns true if ValidateCommandAccess script is present. In other cases returns false.

property HasValidateCommandAccess: Boolean read write

HasValidateDataTableAccess

Returns true.

property HasValidateDataTableAccess: Boolean read write

HasValidateDirectSQLAccess

Returns true.

property HasValidateDirectSQLAccess: Boolean read write

ScriptableComponent    (declared in TDAScriptingProvider)

property ScriptableComponent: TScriptableComponent read write

SubScripts

Represent the whole list of Scripts for every data table in the TDASchema.

property SubScripts: TStringList read write

 

constructor Create  override

Creates a new instance.

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner.

AfterCommit

Called just after a transaction (set of insert/update/delete) has been committed.

procedure AfterCommit

AfterExecuteCommand

Called after an sql command is executed.

procedure AfterExecuteCommand(aSQL: string; aCommandName: string; aParameters: DataParameterArray; aRowsAffected: integer)

Parameters:

  • aSQL: sql
  • aCommandName: command name
  • aParameters: parameters
  • aRowsAffected: rows affected

AfterGetData

Called after a request for data is sent.

procedure AfterGetData(aTables: StringArray; aRequestInfo: TableRequestInfoArray)

Parameters:

  • aTables: table's names
  • aRequestInfo: request infos

AfterProcessDelta

Called for each Delta on the server after it's applied. Any changes done to the delta will only be sent back to the client.

procedure AfterProcessDelta(aDelta: IDADelta)

Parameters:

  • aDelta: delta

AfterProcessDeltaChange

Called after each change is applied to the database.

procedure AfterProcessDeltaChange(aDelta: IDADelta; aChange: TDADeltaChange; aWasRefreshed: Boolean)

Parameters:

  • aDelta: delta
  • aChange: change
  • aWasRefreshed: mode

AfterRollback

Called just after a transaction (set of insert/update/delete) is rolled back (canceled).

procedure AfterRollback

Assign  override    (declared in TDAScriptingProvider)

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

BeforeCommit

Called just before a transaction (set of insert/update/delete) has been committed.

procedure BeforeCommit

BeforeDelete

Called when the client (or server depending on the schema settings) deletes a record.

procedure BeforeDelete(aRow: IDARowHelper)

Parameters:

  • aRow: record

BeforeExecuteCommand

Called before an SQL command is executed.

procedure BeforeExecuteCommand(aSQL: string; aCommandName: string; aParameters: DataParameterArray)

Parameters:

  • aSQL: sql command
  • aCommandName: command's name
  • aParameters: parameters

BeforeGetData

Called before a request for data is sent.

procedure BeforeGetData(aTables: StringArray; aRequestInfo: TableRequestInfoArray)

Parameters:

  • aTables: table's names
  • aRequestInfo: request infos

BeforePost

Called before a change to a record is accepted.

procedure BeforePost(aRow: IDARowHelper)

Parameters:

  • aRow: record

BeforeProcessDelta

Called for each delta on the server before it's applied. Any changes done to the delta will be posted to the database.

procedure BeforeProcessDelta(aDelta: IDADelta)

Parameters:

  • aDelta: delta

BeforeProcessDeltaChange

Called before each change is applied to the database. Any implementation should return the current value of canRemove unless it changed.

procedure BeforeProcessDeltaChange(aDelta: IDADelta; aChange: TDADeltaChange; aWasRefreshed: Boolean; var aCanRemove: Boolean)

Parameters:

  • aDelta: delta
  • aChange: change
  • aWasRefreshed: mode
  • aCanRemove: specifies that this change can be removed from sending back to client

BeforeRollback

Called just before a transaction (set of insert/update/delete) is rolled back (canceled).

procedure BeforeRollback

CreateTransaction

Called when a new transaction is created to fetch or update records.

procedure CreateTransaction

DoContextChangedArgs  protected virtual

Fires OnContextChanged event.

procedure DoContextChangedArgs(aEngine: TDAEcmaScriptEngine; aContext: IDAScriptContext; aServerContext: IDAServerScriptContext; IsSubscript: Boolean; aSubScript: string)

Parameters:

  • aEngine:
  • aContext:
  • aServerContext:
  • IsSubscript:
  • aSubScript:

DoError  protected virtual

Fires OnError event

procedure DoError(aError: ScriptException)

Parameters:

  • aError: Exception

DoLog  protected virtual

Fires OnLog event

procedure DoLog(aMessage: string)

Parameters:

  • aMessage: Message

Fail  protected

Raises the specified exception.

function Fail(args: array of variant): variant

Parameters:

  • args: Specified array of parameters.

GetEngineClass  protected virtual abstract

Returns default engine class for current script provider.

function GetEngineClass: TDAEcmaScriptEngineClass

GetLDAWrapperClass  protected virtual abstract

Specifies LDAWrapper class.

function GetLDAWrapperClass: TDAEcmaLDAWrapperClass

GetNative  protected

Implements IDANativeAccess method. Returns Self

function GetNative: TObject

GetWhereBuilderClass  protected virtual abstract

Specifies WhereBuilderMethods class.

function GetWhereBuilderClass: TDAEcmaWhereBuilderMethodsClass

InitializeEngine  protected virtual

Used for additional initialization of engine.

procedure InitializeEngine(aEngine: TDAEcmaScriptEngine)

Parameters:

  • aEngine: Engine

LoadScript

Loads specified script.

procedure LoadScript(aScript: string)

Parameters:

  • aScript: Specified script.

LogMessage  protected

Logs specified information.

function LogMessage(args: array of variant): variant

Parameters:

  • args: Specified collection with information need to log.

NewGuid  protected

Creates and returns new Guid value.

function NewGuid(args: array of variant): variant

Parameters:

  • args: are not used.

NewGuidString  protected

Creates and returns new Guid value as string.

function NewGuidString(args: array of variant): variant

Parameters:

  • args: are not used.

OnNewRow

Called when creating new rows, it can be used to initialize new records.

procedure OnNewRow(aRow: IDARowHelper)

Parameters:

  • aRow: Row

ProcessError

Called when an error occurs during applying a change. Should return the current value of aCanContinue, or false to stop trying the next change.

procedure ProcessError(aDelta: IDADelta; aChange: TDADeltaChange; var aCanContinue: Boolean; var aError: Exception)

Parameters:

  • aDelta: Delta instance containing failed data change
  • aChange: DeltaChange that cannot be applied to the database
  • aCanContinue: Flag indicating wthether Data Abstract should process other DeltaChange instances instead of rolling back the transaction immediately
  • aError: Exception raised by the data change attempt

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned RO components.

procedure ROFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Disables destruction notification for specified RO component.

procedure RORemoveFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

ScriptObjectToVariant  protected virtual

Used for convertation of Script object into variant object.

TDAActiveScriptProvider converts ScriptObject into COM compatible object.

function ScriptObjectToVariant(aObj: TDAEcmaBaseScriptObject): variant

Parameters:

  • aObj: Object

SupportsLanguage

Returns true if aName equals: js, javascript, jscript, ecmascript, rsljavascript. Otherwise returns false.

function SupportsLanguage(aName: string): Boolean

Parameters:

  • aName: specified language name.

UnknownSqlMacroIdentifier

Called when an unknown macro is used from within an sql statement.

procedure UnknownSqlMacroIdentifier(aIdentifier: string; var aValue: string)

Parameters:

  • aIdentifier: identifier.
  • aValue: value.

ValidateCommandAccess

Called before a command is executed. Should return true if access is allowed.

procedure ValidateCommandAccess(aName: string; aParameterNames: array of string; aParameterValues: array of Variant; var aAllowed: Boolean)

Parameters:

  • aName: command name.
  • aParameterNames: parameter names
  • aParameterValues: parameter values
  • aAllowed: contains access state

ValidateDataTableAccess

Called during validation of request (fetching) for a data table. Should return true if access to that table should be allowed.

procedure ValidateDataTableAccess(aName: string; aParameterNames: array of string; aParameterValues: array of Variant; var aAllowed: Boolean)

Parameters:

  • aName: table name
  • aParameterNames: parameter names
  • aParameterValues: parameter values
  • aAllowed: contains access state

ValidateDirectSQLAccess

Called when a user executes raw sql, generally this is disabled but can be allowed by returning true here.

procedure ValidateDirectSQLAccess(aSQL: string; aParameterNames: array of string; aParameterValues: array of variant; var aAllowed: Boolean)

Parameters:

  • aSQL: raw sql.
  • aParameterNames: parameter names
  • aParameterValues: parameter values
  • aAllowed: contains access state

VariantArrayToEcmaVariant  protected virtual

Converts array of variant into variant.

function VariantArrayToEcmaVariant(args: array of Variant): Variant

Parameters:

  • args: array of variant

 

OnContextChanged

Fires when Context property is changing.

property OnContextChanged: TDABaseEcmaScriptContextChangedArgs read write
delegate: procedure OnContextChanged(aEcmaScriptProvider: TDABaseEcmaScriptProvider; aEngine: TDAEcmaScriptEngine; aContext: IDAScriptContext; aServerContext: IDAServerScriptContext; IsSubscript: Boolean; aSubScript: string)

OnError

Fires when Error is happed.

property OnError: TDABaseEcmaScriptErrorEvent read write
delegate: procedure OnError(aEcmaScriptProvider: TDABaseEcmaScriptProvider; aError: ScriptException)

OnLog

Fires when script execute function LogMessage to log specified information.

property OnLog: TDABaseEcmaScriptLogEvent read write
delegate: procedure OnLog(aEcmaScriptProvider: TDABaseEcmaScriptProvider; aMessage: string)

Descendants

See Also