[Gambas-user] Passing ... parameters

GMail adamnt42 at ...626...
Sun Dec 11 00:00:28 CET 2011


Ha! Got it solved.

All I need to do is the same check in the wrapper as the base class.
There appears to be a strange effect if there is only on real parameter
and it is already a Variant[]. So I just check for that instance in the
wrapper class and call the base DBRead directly using Param[0].

Now the wrapper code is:
    If Param.Count = 1 and Param[0] is QBE then
        decipher_QBE(Param[0],localtarget,localquery,localsort)
        Return Super.DBRead(localobject,localquery,localsort)
    else if Param.Count = 1 and Param[0] is Array then
	Return Super.DBRead(Param[0])
    else
        Return Super.DBRead(Param.All)
    Endif

and it all works! :-)

Thanks for the help guys.
Bruce





More information about the User mailing list