Consultor Eletrônico



Kbase P163625: Window does not have focus when first displayed
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/14/2010
Status: Unverified

SYMPTOM(s):

Window does not have focus when first displayed

{&window-name}:move-to-top() method does not have any effect.

FACT(s) (Environment):

Clicking on the window gives it focus.
The program that displays the window has set the session wait state to "GENERAL" at the time the the window is displayed.
The program that displays the window sets the session wait state to "" after the window is displayed.
Other windows started from the same program do have focus when they are first displayed.
Windows
Progress 9.x
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)

CAUSE:

The "GENERAL" wait state (or any non-null wait state) prevents the new window from obtaining focus.
In this case, the other windows that were able to obtain focus set the session wait state to "" (null) before enabling the UI. The window that did not do this did not get focus. Because the calling program set the wait state to "" after control was returned to it by the window, the window without focus was able to obtain focus by the time it was clicked with the mouse.

FIX:

Depending on application requirements, insert the statement:

SESSION:SET-WAIT-STATE("").
in one of the following places:

In the program running the window, before the window is run.
In the window program, before

RUN enable_UI.