Consultor Eletrônico



Kbase 14002: How to APPLY ENTRY to a widget in a PERSISTENT window
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
How to APPLY ENTRY to a widget in a PERSISTENT window


Here are steps showing how to APPLY ENTRY from one window
to a particular widget in another (persistent) window.


(1) Consider two windows with program names main.w and
newwin.w. In main.w there is a button which ON CHOOSE
will RUN newwin.w PERSISTENT.


(2) In main.w you should also define a variable p-handle as HANDLE.
This is a variable that will be used to store the procedure
handle of newwin.w when it is run.


(3) The RUN statement in main.w should read:

RUN newwin.w PERSISTENT SET p-handle.


(4) In newwin.w, there is an internal procedure called appl_ent
which is used to APPLY ENTRY to a widget in newwin.w. Let's
say the widget we want is a fill-in called fill-in-1, and
that the frame it resides on in newwin.w is called frame-b.

This means that newwin's procedure appl_ent will consist of
one line of code:

APPLY "ENTRY" TO fill-in-1 IN FRAME frame-b.

(Note: no need to include RETURN NO-APPLY!)


(5) The scenario is this: after choosing the button to run newwin.w,
the programmer would like to create a mechanism which would
allow the user to APPLY ENTRY to fill-in-1 in the newly run
persistent window. To do this, in main.w there should be a
trigger which does the following:

RUN appl_ent IN p-handle.

Because we stored the handle for the newwin.w procedure in the
variable p-handle, PROGRESS will use the handle to run
newwin's internal procedure and entry will be applied to the
fill-in.

Progress Software Technical Support Note # 14002