Chapter Contents

Previous

Next
NOTIFY

NOTIFY



Sends a method to a control that is identified by its name

Category: Object Oriented
Valid: FRAME programs only


Syntax
Details
Example
See Also

Syntax

CALL NOTIFY(control-name,method-name<,parameters>);

control-name
is the control to send the method to, or '.' (a string containing a period) to send the method to the FRAME entry component.

Type: Character

method-name
is the method to invoke.

Type: Character

parameters
specify additional numeric or character arguments, separated by commas, that are required by the method.

Note:   These parameters are update parameters. See Input, Output, and Update Parameters for more information.  [cautionend]

Type: Numeric, Character


Details

NOTIFY sends a method to a control in a FRAME entry by specifying the control's name. NOTIFY may be called only from the SCL program for the FRAME entry to which the control belongs, because that is the only code in which the control's name is not ambiguous. You can also use NOTIFY as a function if the called method returns a value with a RETURN statement in the program that defines the method.

Note:   As with DISPLAY, the SCL compiler cannot determine which data types are expected for each of the parameters passed to a method. When the application executes, SAS/AF software verifies that each parameter is correct. If there is a type error, the SCL program halts.  [cautionend]

In most cases, put quotation marks around the control name so that the value of the control is not passed to NOTIFY. For example, the following code hides the Version 6 control named BUTTON:

CALL NOTIFY('button','_hide');

However, if BUTTON has a value of OK, the following code hides the control named OK:

CALL NOTIFY(button,'_hide');

If the value of BUTTON is not the name of a control, the program halts.

Similarly, be sure to put quotation marks around method-name unless method-name is an expression.

For more information about dot notation, see Accessing Object Attributes and Methods With Dot Notation.


Example

Suppose you have a FRAME entry with two Version 6 pushbuttons, OK and NOT_OK. The following code causes OK to be grayed when a user clicks on NOT_OK:

NOT_OK:
   call notify('ok','_gray');
return;

The following example fills a list with the set of controls in the FRAME entry:

controls=makelist();
call notify('.','_getWidgets',controls);

See Also

APPLY

INSTANCE

LOADCLASS

LOADRES

SEND

SUPAPPLY

SUPER


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.