Montura Consulting   Research & Development
SAS/AF Pushbutton

 

Commands, Parameters, Directives

Pushbutton

_sendEvent is the easy way to trigger a reaction across Frame widgets, and across multiple Frames

  • No need for parameters between methods
  • No need for parameters between widgets.
class pushbutton2 extends sashelp.classes.pushbutton_c.class;
public char label / (state='o', initialValue='TOC'); public num icon / (state='o', initialValue=279);

_onClick: method / (state='o');
_super();

enabled='No'; dcl list gParameter=getniteml(envlist('G'), 'parameter'); dcl list gLog=getniteml(envlist('G'), 'log');
insertc(gParameter, 'download toc', -1); insertc(gParameter, 'refresh toc', -1); insertc(gParameter, 'refresh domain', -1); insertc(gParameter, 'present error log', -1); dcl num xCmd; do xCmd=1 to listlen(gParameter) while (nameditem(gLog, 'abend')=0); frameid._sendEvent('process parameter'); popc(gParameter); end;
enabled='Yes';
endmethod;
endclass;

Pushbutton Metadata

Store paramenters as external metadata whenever possible.

class pushbutton2 extends sashelp.classes.pushbutton_c.class;
    public list parameter /(sendEvent='N');

public char label / (state='o', initialValue='TOC'); public num icon / (state='o', initialValue=279);

_onClick: method / (state='o');
_super();

enabled='No'; dcl list gParameter=getniteml(envlist('G'), 'parameter'); dcl list gLog=getniteml(envlist('G'), 'log');
fillist('catalog', 'screen.commands.importtoc.slist', gParameter); dcl num xCmd; do xCmd=1 to listlen(gParameter) while (nameditem(gLog, 'abend')=0); frameid._sendEvent('process parameter'); popc(gParameter); end;
enabled='Yes';
endmethod;
endclass;

 

The GUI

In this example, the TOC button triggers a response in two tableviewers, two sas dataset models, one pushbutton, and one listbox. There are also a series of non-visual programs that import each worksheet from the Excel spreasheet with CDISC specifications.

 

 

COPYRIGHT © 1989 - 2010 Montura, Inc.
All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Terms & Conditions -- Privacy Policy