Kbase 16359: Message and status area window attributes and error 4053
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  30/06/1998 |
|
Message and status area window attributes and error 4053
INTRODUCTION
============
This knowledgebase entry describes when error 4053 can occur
when attempting to set certain window attributes. This
includes windows explicitly created in the code and the static
windows (default-window) created by Progress.
EXPLICITLY CREATED WINDOWS
==========================
Certain attributes, such as MESSAGE-AREA and STATUS-AREA, of
windows that have been explicitly created with the create
window statement can only be set BEFORE the window is realized.
For example,
DEFINE VAR window-1 AS WIDGET-HANDLE.
DEFINE VAR a AS CHAR.
CREATE WINDOW window-1 ASSIGN
SENSITIVE = YES
HIDDEN = NO.
window-1:MESSAGE-AREA = no.
DEFINE FRAME testfr
a.
ENABLE ALL WITH FRAME testfr IN WINDOW window-1.
WAIT-FOR CLOSE OF THIS-PROCEDURE.
the above code sample fails with error 4053,
"**Unable to set MESSAGE-AREA because the WINDOW widget has been
realized (4053)".
If you need to set an attribute like MESSAGE-AREA or STATUS-AREA
then it should be set in the assign portion of the create
window statement (so that it is done before the window is realized).
STATIC WINDOW
=============
When a Progress session is started a static window is created for
the session which can be accessed with DEFAULT-WINDOW. There is no
way to change the above discussed attributes for this static window
because this window is realized when the session starts. The
Progress Version 8 Programming Handbook does state in the Windows
chapter that these attributes can be changed for the static window.
This is an error in the documentation that will be addressed for a
future release.
For example,
DEFINE VAR a AS CHAR.
DEFAULT-WINDOW:STATUS-AREA = no.
UPDATE a.
will also generate error 4053,
"**Unable to set STATUS-AREA because the WINDOW widget has been
realized. (4053)".
If you need to changes these attributes then you should
explicitly create a window in your code. The above code would
be re-written as:
DEFINE VAR a AS CHAR.
DEFINE VAR window-2 AS WIDGET-HANDLE.
CREATE WINDOW window-2 ASSIGN
HIDDEN = yes
STATUS-AREA = no
SENSITIVE = yes.
window-2:HIDDEN = no.
UPDATE a in WINDOW window-2.
GUI VS TTY APPLICATIONS
=======================
This knowledgebase entry applies to graphical interfaces only since
creating a window explicitly is not allowed with character mode
interfaces. Therefore, with a character mode application, the
window attributes of the static window (DEFAULT-WINDOW) created by
Progress cannot be modified. So, for example, the message and status
areas cannot be removed for a character mode application.
REFERENCES TO WRITTEN DOCUMENTATION
===================================
Progress Version 8 Programming Handbook
Progress Software Technical Support Note # 16359