Hi Thierry,
> This is only the basic.
>
> No one has an example of Delphi AND cach� source code for transfering
> 'LIST' from cach� to Delphi ???
> And how to construct 'List' in cach�, for example all employees name
> or XML strings.
> Returning a simple $String don't work, because we are limited by the
> size of this string.
go the OOP way!
Cache Class:
Class MyPackage.MyClass Extends %RegisteredObject [ ProcedureBlock ]
{
Property Number as %Integer;
ClassMethod MyClassMethod() as %ArrayOfObjects
{
s array=##class(%ArrayOfObjects).%New()
f count=1:1:1000 {
s instance=##class(MyClass.MyPackage).%New()
s instance.Number=count
d array.SetAt(instance,array.Count()+1)
}
q array
}
}
In Delphi
var
test,
array : Variant;
i : Integer;
begin
test := CacheFactory.Static('MyPackage.MyClass');
array := test.MyClassMethod;
for i := 1 to array.Count do
begin
ShowMessage(array.GetAt(i).Number;
end;
end;
HTT
Florian