PDA

View Full Version : UChar[] error



Sture
10-Feb-2015, 01:27 PM
I have a WebApp situation where the runtime "disappears" while executing line 160 in DDExtFld.pkg.

This line is in a "Procedure FieldUpdate Integer bSave" and the line itself reads:


Set_Field_Value iFile iField to FieldArray // LENGTH iFieldLen

The error happens only when FieldArray is empty.

-Sture

Michael Mullan
10-Feb-2015, 05:03 PM
Yep. I found that too,but in a Windows program. I put in a test to see if the length of the array was zero and if it was then procedure_return

Sture
10-Feb-2015, 05:16 PM
Hi Michael,

I have changed the offendlig line to


If (SizeOfArray(FieldArray)>0) Begin // Sture
Set_Field_Value iFile iField to FieldArray // LENGTH iFieldLen
End
Else Begin
Set_Field_Value iFile iField to ""
End

and peace reigns.

-Sture

Michael Mullan
10-Feb-2015, 05:21 PM
I like your solution better.

Sture
10-Feb-2015, 05:24 PM
Yep, because it also can save a blank value. Yours can't.

-Sture

Martin Moleman
11-Feb-2015, 03:11 AM
I ran into the same problem recently. Should be fixed in the next build.

Michael Mullan
11-Feb-2015, 06:06 AM
Was Sture's fix the right one? Or did you do something else?

Sture
11-Feb-2015, 06:22 AM
I expect that they will fix the set_field_value command so that "my fix" is not needed.

-Sture

Martin Moleman
12-Feb-2015, 02:48 AM
Right, it's a fix in the runtime. The fix will be in the next 18.1 alpha.