Consultor Eletrônico



Kbase P4438: The same methods invoked in a browser in CHUI and GUI behave
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   29/07/2003
Status: Unverified

FACT(s) (Environment):

Progress 9.1x

SYMPTOM(s):

The same methods invoked in a browser in CHUI and GUI behave differently

FIX:

The solution is to adjust the procedure code to graphical or character environment requirements.

The code bellow shows the code for windows environment (GUI) and for SCO environment (CHUI).

/* Windows version GUI*/

DEF VAR method-status AS LOGICAL.
DEF QUERY q1 FOR customer.

define browse b1 query q1 display customer.custnum name balance
with 10 down multiple centered title
" Customer Datails " .
define frame f1
customer.custnum name creditlimit
b1.

ON CURSOR-DOWN OF b1
DO:

method-status = b1:SELECT-NEXT-ROW() IN FRAME f1.

FIND CURRENT customer NO-ERROR.
MESSAGE customer.custnum name creditlimit VIEW-AS ALERT-BOX.

END.

ON CURSOR-UP OF b1
DO:

method-status = b1:SELECT-PREV-ROW() IN FRAME f1.

FIND CURRENT customer no-error.
MESSAGE customer.custnum name creditlimit VIEW-AS ALERT-BOX.
END.

on value-changed of b1 do:
find current customer no-error.
display customer.custnum name creditlimit with frame f1.
end.

find first customer no-error.
display customer.custnum name creditlimit with frame f1.
open query q1 for each customer no-lock.
enable all with frame f1.
method-status = b1:SELECT-FOCUSED-ROW() IN FRAME f1.
wait-for window-close of current-window.


/* Code for SCO CHUI*/

DEF VAR method-status AS LOGICAL.
DEF QUERY q1 FOR customer.

define browse b1 query q1 display customer.custnum name balance
with 10 down multiple centered title
" Customer Datails " .
define frame f1
customer.custnum name creditlimit
b1.

ON CURSOR-DOWN OF b1
DO:

if available customer then
MESSAGE customer.custnum name creditlimit VIEW-AS ALERT-BOX.
FIND NEXT customer NO-ERROR.

END.

ON CURSOR-UP OF b1
DO:

if available customer then
MESSAGE customer.custnum name creditlimit VIEW-AS ALERT-BOX.
FIND PREV customer NO-ERROR.


END.

on value-changed of b1 do:
find current customer no-error.
display customer.custnum name creditlimit with frame f1.
end.

find first customer no-error.
display customer.custnum name creditlimit with frame f1.
open query q1 for each customer no-lock.
enable all with frame f1.

wait-for window-close of current-window.