Hi all,
I have a database that I've just converted from Active4D v3.x. and 4D
6.8 to Active4D v4 rc6 and 4D 2004.4.
Everything works AOK except for the following line of code:
vTotalStaffRequired:=$SumRequired-aSplitTotals{6}
vTotalStaffRequired is typed in the database as a longint and is
initialised in the A4D script via a call to a 4D Method.
$SumRequired is also typed as a longint and is assigned within the
A4D Script
aSplitTotals{6} is a Longint array and is assigned in the script by
a 4D Method call
Whilst I can do the following:
vTotalStaffRequired:=$SumRequired
vTotalStaffRequired:= aSplitTotals{6}
if I try to do vTotalStaffRequired:=$SumRequired-aSplitTotals{6} I
get the following error: "Cannot change the type of a 4D variable in
a compiled database"
The following lines of code all return the value 9 (i.e. type Longint)
write to console('vTotalStaffRequired=`type(vTotalStaffRequired)`')
write to console('SumRequired=`type($SumRequired)`')
write to console('aSplitTotals{$Role}=`type(aSplitTotals{$Role})`')
so vTotalStaffRequired is definately being seen as a longint.
In fact if I do,
vTotalStaffRequired :=10
the assignment happens without a problem.
So it appears I cannot assign anything to vTotalStaffRequired if the
value being assigned to it is in the form of a variable.
Anyone any idea what is going on here?
Regards, Michael.
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/