Hi all,
(
Edit: EA 12.1)
For some reason adding method parameters into new classes & methods fails consistently during (import from text file). When I look at the db tables (t_operationparams) I noticed that the parameters end up in the table, but no OperationID is ever assigned (or, the params are not actually attached to the method it seems). Classes and Methods are successfully created though (at least they show up in the model treeview).
This code (with valid string data, see log text below)
Private Sub CreateSignature(ByRef aMethod, aSignatureString)
Dim ParamObj As EA.Parameter
''' blah blah
For i = 0 to UBound(arr)
''' Blah, blah
sType = EnsuredTypeName(sType)
Set ParamObj = aMethod.Parameters.AddNew(sName, sType)
''' Blah, blah
LogForced "----------------------------"
LogForced "Parameter Name: " + sName
LogForced "Parameter Type: " + sType
if ParamObj.Update() = False then _
LogForced "#### Error creating Parameter: " + ParamObj.Name
Next
aMethod.Parameters.Refresh
aMethod.Update()
End Sub
... results in consistent errors, like so:
[410218891] 14:18:18: ----------------------------
[410218892] 14:18:18: Parameter Name: val
[410218892] 14:18:18: Parameter Type: System.Drawing.Font
[410218900] 14:18:18: #### Error creating Parameter: val
[410218922] 14:18:18: ----------------------------
[410218922] 14:18:18: Parameter Name: key
[410218923] 14:18:18: Parameter Type: String
[410218931] 14:18:18: #### Error creating Parameter: key
[410218936] 14:18:18: ----------------------------
Tables looking like this:
Not one single parameter (out of several hundred) is successfully added to any method. Any ideas about where to look for the problem?
Scratching head.
// Rolf