11.32 parsepath()

With this function an object can be requested with the help of the object name.

Definition

object parsepath
(
      string  ObjectName input
  { , object  Parent := null input }
  { , object  Dialog := null input }
  { , integer Index  := 0 input }
)

Parameters

string ObjectName input

This parameter indicates the name of the searched object.

The value specified in the ObjectName parameter represents a search path starting from the object specified in the Parent parameter. An empty string in the parameter ObjectName ("") corresponds to an empty search path.

object Parent := null input

This optional parameter denotes the parent of the searched object. If this parameter is indicated, the given object will be searched for below the object. If the null object is specified for this parameter, the object will be searched for in the indicated dialog or in the current dialog. If resources are searched for, this parameter has to be specified by the null object.

If functions in applications are to be searched, the application has to be given.

object Dialog := null input
This optional parameter denotes the dialog of the searched object. If this parameter is not specified, the object will be searched for in the current dialog. If an object is to be searched in the module, the corresponding module must be specified in this parameter.
integer Index := 0 input
If Index is greater than 0, then all children in the child children of the object are searched for that match the corresponding ObjectName. The index > 0 tells the function what number of occurrences of ObjectName to search for. If no child exists for this index, then null is returned.

Return value

ObjektID
The searched object will be returned.
null

The specified object could not be found or the object name is not unique.

This means that there is either none or more than one object with the specified name.

Examples

See also

C function DM_ParsePath in manual “C Interface - Functions”