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.
ASort with codeblock
ASort with codeblock
Kees,
It looks like we have forgotten to implement that.
You should be able to work around this by changing your ASort() line to:
This should also work in VO by the way.
Robert
It looks like we have forgotten to implement that.
You should be able to work around this by changing your ASort() line to:
Code: Select all
aMatrix := ASort(aMatrix, , , {|a,b| cbSort:Eval(a,b) })
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
ASort with codeblock
Robert,robert wrote:Kees,
You should be able to work around this by changing your ASort() line to:Code: Select all
aMatrix := ASort(aMatrix, , , {|a,b| cbSort:Eval(a,b) })
Thank you very much, this works!
Kees.