Kbase P4116: Error 4053 when trying to set the multiple attribute for a d
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  18/03/2003 |
|
Solution ID: P4116
FACT(s) (Environment):
Progress 9.1x
SYMPTOM(s):
Error 4053 when trying to set the multiple attribute for a dynamic browse
**Unable to set <attribute> because the <widget id> has been realized. (4053)
FIX:
The MULTIPLE attribute can be set either for the dynamic browser and static browser.
This attribute cannot be changed after the browser is created, and a dynamic browser is created when the VISIBLE attribute is set to TRUE.
MULTIPLE attribute MUST be set before the VISIBLE=TRUE attribute
The following are two examples of how to set the MULTIPLE property for a dynamic browser.
/*----------------------------------------------------------*/
/* Sets the MULTIPLE attribute when the browser is created. */
/*----------------------------------------------------------*/
DEFINE VARIABLE hQuery AS HANDLE NO-UNDO.
DEFINE VARIABLE hBrowse AS HANDLE NO-UNDO.
DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
DEFINE FRAME framea WITH SIDE-LABELS SIZE 132 BY 18 THREE-D NO-LABELS.
CREATE QUERY hQuery.
CREATE BUFFER hBuffer FOR TABLE "customer":U.
hQuery:SET-BUFFERS(hBuffer).
CREATE BROWSE hBrowse
ASSIGN FRAME = FRAME framea:HANDLE
QUERY = hQuery
TITLE = " "
X = 2
MULTIPLE = TRUE
VISIBLE = TRUE
SENSITIVE = TRUE
Y = 2
WIDTH = 68
DOWN = 12
READ-ONLY = YES
COLUMN-SCROLLING = TRUE
SEPARATORS = YES.
hBrowse:ADD-COLUMNS-FROM(hBuffer:NAME).
hQuery:QUERY-PREPARE("FOR EACH ":U + hBuffer:NAME + " NO-LOCK":U).
hQuery:QUERY-OPEN().
WAIT-FOR "CLOSE":U OF THIS-PROCEDURE.
/*----------------------------------------------------------*/
/* Sets the MULTIPLE attribute after the browser is created */
/*----------------------------------------------------------*/
DEFINE VARIABLE hQuery AS HANDLE NO-UNDO.
DEFINE VARIABLE hBrowse AS HANDLE NO-UNDO.
DEFINE VARIABLE hBuffer AS HANDLE NO-UNDO.
DEFINE FRAME framea WITH SIDE-LABELS SIZE 132 BY 18 THREE-D NO-LABELS.
CREATE QUERY hQuery.
CREATE BUFFER hBuffer FOR TABLE "customer":U.
hQuery:SET-BUFFERS(hBuffer).
CREATE BROWSE hBrowse
ASSIGN FRAME = FRAME framea:HANDLE
QUERY = hQuery
TITLE = " "
X = 2
SENSITIVE = TRUE
Y = 2
WIDTH = 68
DOWN = 12
READ-ONLY = YES
COLUMN-SCROLLING = TRUE
SEPARATORS = YES.
hBrowse:ADD-COLUMNS-FROM(hBuffer:NAME).
hQuery:QUERY-PREPARE("FOR EACH ":U + hBuffer:NAME + " NO-LOCK":U).
hQuery:QUERY-OPEN().
hBrowse:MULTIPLE = TRUE.
hBrowse:VISIBLE = TRUE.
WAIT-FOR "CLOSE":U OF THIS-PROCEDURE.