Command AP Modify method

4D Pack

AP Modify method

version 11.3


AP Modify method (methodName; methodCode) Longint

ParameterTypeDescription
methodNameString (31)Name of method to modify
methodCodeBLOBBLOB containing the method text

Function result Longint Error code (0=no error)

Description

The AP Modify method command lets you modify the source code of a project method in the structure of a 4D database (interpreted databases only).

Pass the name of an existing project method in the methodName parameter (the names of 4D methods may contain up to 31 characters).

In methodCode, pass a BLOB containing the new text of the method. If you use the TEXT TO BLOB command to fill the BLOB, specify the Mac C string format (or 0) as the 3rd parameter of this command.

If the method is modified correctly, the command returns 0. Otherwise, it returns one of the following error codes:

1 = A bad parameter type has been passed.

2 = The database is running in compiled mode.

3 = The method name is an empty string.

4013 = Invalid method name.

4015 = The method source code could not be modified.

Note: This command does not work if it is executed from a compiled application.

See Also

AP Create method, AP Does method exist.