Wrapper program function not working in GUI

glenswan

New Member
I have created several wrapper programs to change default value of fields. I can get them working properly in Character but when I convert and run in GUI, it does not work.

Any tricks/tips to make it work?


Here is my code to change "Previos Operation complete" field to NO in 17.5 Operation Complete Transaction

Progress 8.3D
MfgPro 9.0

define variable vCompPrev as handle.
Function get-sibling returns HANDLE ( input child as HANDLE, Input sibling_name as CHAR ).
define variable parent as handle.
define variable fchild as handle.
parent = child:pARENT.

IF parent = ? then
do:
return ?.
end.

fchild = parent:first-child.

repeat:
if fchild = ? then
leave.
if fchild:name = sibling_name then
return fchild.
fchild = fchild:next-sibling.
end.

return ?.
END Function.
/*-----------------------------------------------------------*/
on "entry":U anywhere
do:
case self:name :
when "eff_date" then do:
vcompprev = get-sibling(self:handle, "compprev").
if vCompPrev = ? then leave.
vcompprev:screen-value = "no".
end. /*when eff_date */
end. /*case ...*/

END. /* On entry:u anywhere .*/

PAUSE 0.
{gprun.i ""sfoptr05.p""}
 

ovf

Member
I think the problem is in mfdtitl1.i

/*Standard
ON ENTRY OF CURRENT-WINDOW ANYWHERE
PERSISTENT RUN P-HANDLE-ENTRY IN global-drop-down-utilities.
*/
/*OVF */
ON ENTRY OF CURRENT-WINDOW ANYWHERE
DO:
APPLY "U10" TO SELF.
RUN P-HANDLE-ENTRY IN global-drop-down-utilities.
END.

Now You can create your wrapper applications - reacting on U10.

Ole
 

glenswan

New Member
Thanks OVF for your reply. I will give your suggestion a try when I get a chance (it may be a few days).

Glen
 
Top