Chapter Contents |
Previous |
Next |
Data Set Data Model: _execCmd |
Syntax | |
Details | |
Example |
Syntax |
CALL SEND (object-id, '_execCmd'); |
Details |
The _execCmd method is called on a model attached to a viewer only after the viewer tries to process the command. If the command is unrecognized by the viewer, it is sent to the model.
Use the _execCmd method when you want the model to process commands. Note that the command is not passed as an argument. Rather, it processes commands that are sent to the object. Commands are processed in the following order:
Note: If the _execCmd method receives a Data Set Model
or a Data Set Data Model command, it commits any current row edits or a pending
row to the data set and unlocks the currently locked row, if any.
Example |
The following example is an SCL program for a FRAME entry containing either a Data Form or Data Table object called VIEWER. This code allows the FORWARD or BACKWARD commands to scroll in VIEWER regardless of which object on the frame is active at the time the command is issued. All other commands are passed to the model using the _execCmd method.
INIT: control always; call send(_frame_,'_getWidget', 'viewer',viewid); return; |
MAIN: command=word(1,'u'); select(command); |
when ('BACKWARD') call send(viewid,'_vscroll', 'row',-1); call nextcmd(); |
when ('FORWARD') call send(viewid,'_vscrolll','row',1); call nextcmd(); |
otherwise if command ne _blank_ then call send(viewid,'_execCmd'); end; return; |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.