Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter SeventeenApplication Integration Functions (continued)

GetMappedTextObject Function

Overview

The GetMappedTextObject function returns the handle to a Mapped Text Object (MTO) associated with the specified window (view).

Syntax/Parameters

Syntax

handle = GetMappedTextObject ( handle hwTarget | int index | string name );

Parameters

hwTarget

If specified as a window handle, the request is sent directly to the window.

index

If an int is provided, it is expected to be an edit manager window index. The index can be -1 indicating that the active window is requested.

string

If a string is provided, an attempt is made to locate the window via the name of the window. Untitled windows cannot be accessed with this method.

Return Value

A handle to the created Mapped Text Object or NULL_HANDLE (0) for an error. If an error occurs, a structured error can be retrieved using the GetLastError function.

Remarks

As part of an edit window, all views share the same MTO. Every view, even if the underlying format is not text, will have an MTO even if it is just to manage the underlying file.

The MTO should be closed when all work has been completed. Do not hold an MTO open or get another object for the same window without first closing the previous handle.

See also Mapped Text Objects.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE