Naming and Calling MethodsAfter you've created a new object, you can call its methods. You call a method by using the object's instance name , followed by a dot, then the method. In Normal mode, in the Actions panel's toolbox, simply select the method of that specific object to call its method. For example: newDate = currentDate.getMinutes(); There are three ways in which the Actions panel displays methods, depending on which method you choose. The method may need to have the object parameters defined (see Figure 14.1). In this case, simply type in the object name within the parameters pane. Figure 14.1. This method needs an object name.
The method may need both an object and parameters specified (see Figure 14.2). You must provide an object name and the required parameters in the Parameters pane. Figure 14.2. This method needs an object name and parameters defined.
The method may appear as part of an expression (see Figure 14.3). Here, you must provide the object name before the period. Figure 14.3. This method is part of an expression.
|