OScript API/Built-in Package Index

Class: ObjRef

The type ObjRef is more commonly referred to as type Object within the Livelink universe. This type contains a reference to an OSpace Object. In Livelink, OSpace objects are where a scripted class's structure and behavior are stored as OSpace object features.

ObjRefs are manipulated via the OS built-ins.

A value of type ObjRef is a reference to an OSpace object. OScript can access the features and methods of OSpace objects via an object reference.

An object is created and manipulated with the built-in functions in the Os (OSpace) package. In fact, it is these functions that underlie the Livelink Builder's Object menu commands. The features of an object (both data features and methods) are referenced with the dot operator as objectName.featureName.

For example, if you create an object reference feature named logInfoObj in the UserPkg object that refers to the LogInfo object, you can reference the fName method of LogInfo from a script within UserPkg using the following syntax:

 .logInfoObj.fName

The prepended dot must appear when referencing a feature or method unless the this keyword is explicitly used to reference the current object (without using the object's name):

    this.fName

If you create a global variable named $logInfo to store the logInfoObj object reference, you can reference the fName method of LogInfo from any script using the following syntax:

    $LogInfo.fName

 Copyright © 2023 OpenText Corporation. All rights reserved.