If I use try ... onFail to check whether element exists in DynArray, then paradox
automatically creates this element in array with value "N/A"
Is this normal?
Short script to show you, what I mean:
method run(var eventInfo Event)
var DA DynArray[] AnyType
tmp smallint
endVar
DA["x"] = "x"
view(DA) ; I see only "x" element
try
tmp = DA["does not exist"]
onFail
tmp = 0
endTry
view(DA) ; now I have 2 elements in array "x" and "does not exist"
endMethod
I had to change code to
if DA.Contains("does not exist") then
tmp = DA["does not exist"]
else
tmp = 0
endIf
I had problems, because I send this DA to other methods, which use element "does not exist", and now it has a not-defined value.
Jure