CwGetHandleFromObjectName

Syntax:

hObject = CwGetObjectName(hContext, sName)

        hObject         (handle) The handle of an object

        hContext        (handle) The handle of a group or view to search.

        sName           (string) The name of the object

Description:

This function returns the handle of an object with the name provided in "sName" and contained in the view or group referenced by "hContext". Names are case-insensitive (e.g. 'FOO' and 'foo' are considered identical). If no object with the given name exists, a null handle is returned. If more than one object has the given name, the handle of one of them is returned. There is no way to tell which one.

Example:

/* Get user input by reading the text of a headline text object. */
dh = CwGetHandleFromObjectName(CwGetCurrentView(), 'input')

if \CwIsHandleValid(dh) then do
        say "Error: input object missing."
        exit
        end

userInput = CwGetProperty(CwGetRegion(dh), 'caption')


Functions by NAME

Index

Functions by PURPOSE