Chapter Contents |
Previous |
Next |
Data Form and Data Table: _execCmd |
Delegated to: | Data Set Data Model class |
Syntax | |
Details | |
Example |
Syntax |
CALL SEND (object-id, '_execCmd'); |
Details |
A data form object or data table object will try to process the command. If the command is not recognized by the data form or data table, then the _execCmd method is called. If the method does not recognize the command then the command is sent back to the frame.
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 model command, it commits any
current row edits or a pending row to the data set. In data table, it then
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.
dcl object viewid;
INIT: control always; _frame_._getWidget(viewid); return; |
MAIN: command=word(1,'u'); select(command); |
when ('BACKWARD') call send(viewid,'_vscroll','row',-1); call nextcmd(); |
when ('FORWARD') call send(viewid,'_vscroll','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.