ASort with codeblock
Posted: Thu Mar 12, 2020 9:03 am
Hi,
With ASort() I use a codeblock that is defined as an object of a custom class with an Eval() method, like this:
LOCAL cbSort AS ItemSort
(ItemSort is defined like this:
CLASS ItemSort
PROTECT dwColumn AS DWORD
PROTECT dwMissing AS DWORD
METHOD Eval(a, b)
// code that compares a and b and RETURN's a logic.)
cbSort := ItemSort{dwSort, dwNoshow}
aMatrix := ASort(aMatrix, , , cbSort)
In VO this worked fine, but in X# I get a runtime error at XSharp.RT.Functions.ASort(__Array aTarget, __Usual nStart, __Usual nCount, __Usual cbOrder)
ArgNum :4
FuncSym :ASort
Severity :2
Description :Argument error
SubCodeText :Unknown SubCode
Arg :cbOrder
Any ideas how to fix this?
Kees.
With ASort() I use a codeblock that is defined as an object of a custom class with an Eval() method, like this:
LOCAL cbSort AS ItemSort
(ItemSort is defined like this:
CLASS ItemSort
PROTECT dwColumn AS DWORD
PROTECT dwMissing AS DWORD
METHOD Eval(a, b)
// code that compares a and b and RETURN's a logic.)
cbSort := ItemSort{dwSort, dwNoshow}
aMatrix := ASort(aMatrix, , , cbSort)
In VO this worked fine, but in X# I get a runtime error at XSharp.RT.Functions.ASort(__Array aTarget, __Usual nStart, __Usual nCount, __Usual cbOrder)
ArgNum :4
FuncSym :ASort
Severity :2
Description :Argument error
SubCodeText :Unknown SubCode
Arg :cbOrder
Any ideas how to fix this?
Kees.