METHOD RESOLVE PATH
METHOD RESOLVE PATH ( path ; methodType ; ptrTable ; objectName ; formObjectName {; *} )
Parameter | Type | Description | |
---|---|---|---|
path | Text | → | Path to resolve |
methodType | Integer | ← | Object type selector |
ptrTable | Pointer | ← | Table reference |
objectName | Text | ← | Name of form or database method |
formObjectName | Text | ← | Name of form object |
* | Operator | → | If passed = command applies to host database when executed from a component (parameter ignored outside of this context) |
Description
The METHOD RESOLVE PATH command parses the internal path name passed in the path parameter and returns its different components in the methodType, ptrTable, objectName, and formObjectName parameters.
The methodType parameter receives a value indicating the type of the method. You can compare this value with the following constants of the Design Object Access theme:
Constant | Type | Value | Comment |
---|---|---|---|
Path database method | Integer | 2 | Path of database methods specified. List of these methods: [databaseMethod]/onStartup [databaseMethod]/onExit [databaseMethod]/onDrop [databaseMethod]/onBackupStartup [databaseMethod]/onBackupShutdown [databaseMethod]/onWebConnection [databaseMethod]/onWebAuthentication [databaseMethod]/onWebSessionSuspend [databaseMethod]/onServerStartup [databaseMethod]/onServerShutdown [databaseMethod]/onServerOpenConnection [databaseMethod]/onServerCloseConnection [databaseMethod]/onSystemEvent [databaseMethod]/onSqlAuthentication [databaseMethod]/ onHostDatabaseEvent [databaseMethod]/ onRESTAuthentication [databaseMethod]/ onMobileAppAuthentication [databaseMethod]/ onMobileAppAction |
Path project form | Integer | 4 | Path of project form methods and all their object methods. Examples: [projectForm]/myForm/{formMethod} [projectForm]/myForm/button1 [projectForm]/myForm/mylist [projectForm]/myForm/button1 |
Path project method | Integer | 1 | Name of method. Example: MyProjectMethod |
Path table form | Integer | 16 | Path of table form methods and all their object methods. Example: [tableForm]/table_1/Form1/{formMethod} [tableForm]/table_1/Form1/button1 [tableForm]/table_1/Form1/mylist [tableForm]/table_2/Form1/mylist |
Path trigger | Integer | 8 | Path of database triggers. Example: [trigger]/table_1 [trigger]/table_2 |
Note: The command does not check if the method actually exists in the database/project. An error is generated only when an invalid table name is passed.
The ptrTable parameter contains a pointer to a database table when the path references a table form method or a trigger.
The objectName parameter contains either:
- a form name when the path references a table form or project form
- a database method name when the path references a database method.
The formObjectName parameter contains a form object name when the path references an object method.
If the command is executed from a component, it considers by default that path designates a component method. If you pass the * parameter, then it considers that path designates a host database method.
Example 1
Resolution of a database method path:
var $methodType : Integer
var $tablePtr : Pointer
var $objectName : Text
var $formObjectName : Text
METHOD RESOLVE PATH("[databaseMethod]/onStartup";$methodType;$tablePtr;$objectName;$formObjectName)
// $methodType: 2
// $tablePtr: Nil pointer
// $objectName: "onStartup"
// $formObjectName: ""
Example 2
Resolution of a path for an object of a table form method:
var $methodType : Integer
var $tablePtr : Pointer
var $objectName : Text
var $formObjectName : Text
METHOD RESOLVE PATH("[tableForm]/Table1/output1/myVar1";$methodType;$tablePtr;$objectName;$formObjectName)
// $methodType: 16
// $tablePtr: -> [Table1]
// $objectName: "output1"
// $formObjectName: "Btn1"
See also
Properties
Command number | 1165 |
Thread safe | ✗ |