Properties for User Class Methods
The following are descriptions of properties that you can set for a user class method:
Name
Specifies the name of the method. This name must be a valid OpenROAD name.
Important! In OpenROAD, the following objects can be named: applications, classes, components, databases, database tables and columns, parameters, procedures, user events, and variables. The rules for these names, or alphanumeric identifiers, are as follows:
• Names can contain up to 32 characters.
• Names must begin with an alphabetic character or an underscore (_).
• In addition to letters and numerals, a name may contain these characters: #, @, and $.
• Names are not case sensitive.
• A name may not be a reserved word (see the 4GL Keywords section in the “System Constants and Keywords” appendix of the Language Reference Guide).
Note: You cannot change this property at runtime because 4GL cannot dynamically use different variable names for the same object.
Remark
Specifies a description of the method
Encapsulation
If the Private option is selected on the Create Method dialog, specifies that the method can be accessed only by a method of the current user class or any of its subclasses.
Note: In object‑oriented programming, you can limit access to an object's attributes and methods. The process of allowing only the object itself to have access to its attributes and methods is called encapsulation. In OpenROAD, you accomplish this restriction by flagging an attribute or method as private. You can only reference a private attribute or method in the 4GL code of the methods of the defining user class or its subclasses. For more information, see How You Can Encapsulate Attributes and Methods in the chapter "Working with Classes" in the Programming Guide.
Return Value
Specifies the variable type of the method:
• None
• Simple
• Reference
• Array
Data Type
Specifies the data type of the method for simple type variables only. Valid options are:
• Varchar
• Nvarchar
• Integer
• Smallint
• Float
• Decimal
• Date
• Money
Length
Specifies the maximum number of characters of the method's return value for simple type variables, varchar, and nvarchar data types only
Nullable
Specifies that a null value is allowed for simple type variables only
Class Name
Specifies the name of a system class or another user class in the current application or an included application for reference or array variables only