I am getting this error when tying to view the design of a usercontrol:
"An exception occurred loading the design canvas: The variable 'arrayvar2' is either undeclared or was never assigned."
here is the code in question:
DEFINE VARIABLE arrayvar2 AS Progress.Data.ColumnPropDesc EXTENT 3 NO-UNDO.
arrayvar2[1] = NEW Progress.Data.ColumnPropDesc("AgentGUID", "?", Progress.Data.DataType:CHARACTER).
arrayvar2[2] = NEW Progress.Data.ColumnPropDesc("AgentID", "User Code", Progress.Data.DataType:CHARACTER).
arrayvar2[3] = NEW Progress.Data.ColumnPropDesc("AgentName", "Full Name", Progress.Data.DataType:CHARACTER).
tableDesc1:Columns = arrayvar2.
now, call me stupid, but I *think* that I can see a definition as well as an assignment ...
If I change arrayvar2 to arrayvarBroken, then the error message is
"An exception occurred loading the design canvas: The variable 'arrayvarBroken' is either undeclared or was never assigned."
so, I am in the right area ... but flumoxed ...
any clues ?
Urrggh. Nevermind.
Found the problem.
I had an extra line of code after the @VisualDesigner annotation which caused the problem
Problem code:
@VisualDesigner.FormMember (NeedsInitialize="false", InitializeArray="true").
this-object:gridLookUpEdit1:Properties:DisplayMember = "Description".
def var arrayvar2 AS Progress.Data.ColumnPropDesc EXTENT 2 NO-undo.
arrayvar2[1] = new Progress.Data.ColumnPropDesc("SipServerGUID", "SipServerGUID", Progress.Data.DataType:CHARACTER).
arrayvar2[2] = new Progress.Data.ColumnPropDesc("Description", "Description", Progress.Data.DataType:CHARACTER).
tableDesc1:Columns = arrayvar2.
@VisualDesigner.FormMember (NeedsInitialize="false", InitializeArray="true").def var arrayvar2 AS Progress.Data.ColumnPropDesc EXTENT 2 NO-undo.arrayvar2[1] = new Progress.Data.ColumnPropDesc("SipServerGUID", "SipServerGUID", Progress.Data.DataType:CHARACTER).arrayvar2[2] = new Progress.Data.ColumnPropDesc("Description", "Description", Progress.Data.DataType:CHARACTER).tableDesc1:Columns = arrayvar2.
Dammit.
Julian how did the extra line of code get there?
er, ahh, welll, jeeez, not sure that I can remember ...
I'm writing a code generator that creates usercontrol lookups and the
output builder got it's order slightly gronked .. ;(