Consultor Eletrônico



Kbase 13630: Error 201 when setting any ATTRIBUTE on FRAME or DIALOG BOX
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Error 201 when setting any ATTRIBUTE on FRAME or DIALOG BOX


When trying to change any attribute of a FRAME or DIALOG-BOX, you
might encounter error 201:

** Unknown Field or Variable name - DIALOG-1. (201)


For example, the following statement will not pass syntax check:

DIALOG-1:TITLE = "My Title".


Why? The reason is that the 4GL compiler by default assumes that
any widget referred to in a statement like this is a *field-level*
widget, and searches amongst the field-level widgets in the program
for one that matches the one in the statement. By default
it does *not* check the various frames in a program for a match. This
means that if the widget named in the statement is a frame and *not*
a field-level widget, the compiler will generate an error. This can
be confusing since the programmer will clearly be able to see that the
widget being addressed clearly exists.

But the DIALOG-BOX widget is a *frame*, not a field-level widget.
This means that when the compiler searches for DIALOG-1 amongst the
field-level widgets, it comes up short. To get around the syntax
error you must let the compiler know that it's dealing with one of the
exceptions to its search rule:

FRAME DIALOG-1:TITLE = "My Title".


This statement will pass syntax check because the compiler will know
not to search the existing field-level widgets for a widget called
DIALOG-1. Instead, it will look at the frame(s) in the program
to find the widget you're referring to.

So, when changing the attributes of any FRAME or DIALOG-BOX, be sure
to include the FRAME keyword in the assignment statement.

Progress Software Technical Support Note # 13630