Kbase P55200: Dynamics, default button for Dynamic viewer may lead to erro
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  24/11/2003 |
|
Status: Unverified
FACT(s) (Environment):
Dynamics 2.0A
FACT(s) (Environment):
Dynamics 2.1A
SYMPTOM(s):
**Unable to set attribute DEFAULT-BUTTON for FRAME <frame name>. (4078)
Trying to define a button as default button in a Dynamic Viewer
Dynamics 2.0A02
CAUSE:
Known issue, development aware. You get this error in 2.0A, and in 2.1A if you try to set Frame:DEFAULT-BUTTON in SDV super proc initializeObject
FIX:
In SDV super proc initializeObject
DEFINE VARIABLE h AS HANDLE NO-UNDO.
DEFINE VARIABLE hf AS HANDLE NO-UNDO.
h = widgetHandle("butDefault").
/*The following line makes error in 2.0A, do it only in 2.1A*/
h:DEFAULT = YES. /* so it will look like a default button */
{get ContainerHandle hf}.
/* this fails with error 4078 hf:DEFAULT-BUTTON = h. */
/* work around, not we do not handle the GO event here */
ON 'RETURN':U OF hf ANYWHERE PERSISTENT RUN ReturnPressed IN TARGET-PROCEDURE.
RUN SUPER.
Then in In SDV super proc ReturnPressed:
DEFINE VARIABLE h AS HANDLE NO-UNDO.
h = widgetHandle("butDefault").
APPLY 'CHOOSE' TO h.