Kbase P138683: DOC: Syntax error in the documentation code sample.
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/16/2008 |
|
Status: Unverified
SYMPTOM(s):
DOC: Syntax error in the documentation code sample.
The sample code given for "PROCEDURE recursiveRelationCreateRow" on Page 4-38 of "OpenEdge Development: GUI for .NET Programming" manual has a syntax error.
The locally defined variable hRelation sample code given for "PROCEDURE recursiveRelationCreateRow" on Page 4-38 of the "OpenEdge Development: GUI for .NET Programming" manual is referenced before it is assigned a valid value.
The syntax error is due to the fact that the locally defined hRelation variable is used before it is initialized or assigned a valid value:
PROCEDURE recursiveRelationCreateRow:
DEFINE INPUT PARAMETER sender AS System.Object.
DEFINE INPUT PARAMETER args AS Progress.Data.CreateRowEventArgs.
DEFINE VARIABLE hBuffer AS HANDLE.
DEFINE VARIABLE hQuery AS HANDLE.
DEFINE VARIABLE hTopQuery AS HANDLE.
DEFINE VARIABLE hRelation AS HANDLE.
hBuffer = args:BufferHdl.
IF args:BandIndex EQ 0 THEN
hQuery = hTopQuery.
ELSE
hQuery = hRelation:CURRENT-QUERY(args:BandIndex).
hBuffer:BUFFER-CREATE().
hQuery:CREATE-RESULT-LIST-ENTRY().
args:Created = TRUE.
END.
None at this time. A workaround is to assign a valid value for the variable, pass it as a parameter to the procedure or declare it as a global variable.
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.2A
CAUSE:
Bug# OE00178889