Chapter Contents

Previous

Next
Widget Class: _refresh

Widget Class: _refresh



Redraws a widget without updating its data


Syntax
Details

Syntax

objectName._refresh( );


Details

The _refresh method is executed automatically every time the frame is refreshed. The frame is refreshed when users enter information, the frame receives the _refresh method, or the frame executes an SCL refresh statement.

When the _refresh method executes, the Widget classes supplied with SAS/AF software perform widget-specific operations such as copying data to the window or running the GETROW section of the SCL program.

A widget receives the _refresh method if one of the following conditions is true:

If the _refresh method is invoked on an object before the object's _postinit method has run, the _refresh is changed to a _postinit method. Conversely, if a _postinit method is invoked on an object whose _postinit method has already run, _postinit is changed to _refresh.

Example

In the following example, a subclass of the text label field overrides the _refresh method to update itself with the current time. The label updates its text with the formatted current time and then invokes the super _refresh method, which actually puts the new text label on the window. Before returning, this method calls its _needRefresh method so that it is refreshed the next time the Frame entry is refreshed.

 REFRESH:
  method;
    _self_._setText.putn(time(),time.);
    _super_._refresh();
    _self_._needRefresh();
  endmethod;


Chapter Contents

Previous

Next

Top of Page

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