Chapter Contents

Previous

Next
Data Form and Data Table: _execCmd

Data Form and Data Table: _execCmd



Processes a command

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:

  1. If the command was isued while in a data form object or data table object, the viewer tries to process the command.

  2. If the viewer does not recognize the command, the command is sent to the data set data model object.

  3. If the data set data model object does not recognize the command, the command is sent to the data set model object.

  4. If the data set object model does not recognize the command, the command is returned to the frame.

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.  [cautionend]


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;
 Note about code
INIT:
  control always;
  _frame_._getWidget(viewid);
  return;
 Note about code
MAIN:
  command=word(1,'u');
  select(command);
 Note about code
   when ('BACKWARD')
    call send(viewid,'_vscroll','row',-1);
    call nextcmd();
 Note about code
   when ('FORWARD')
    call send(viewid,'_vscroll','row',1);
    call nextcmd();
 Note about code
   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.