DefineClassByRTTI with tkSets


i'm having problem with the new DefineClassByRTTI procedure.
I use the TkmMemTable which i define by DefineClassByRTTI.
The funtion Sorton has 2 params the first one is a string the second a set of.
e.g Sorton('A',[])
if i use this function  the scripter i always get the an exception EInalidCast for the secod (the set) parameter.
is there are problem with sets or am i doing something wrong.

Have you tried using SetOf function to convert an array of variant to a set? For example

Sorton('A', SetOf([item1, item2]));
if it's an empty set, just pass 0:
Sorton('A', 0)