[V4RB2] Union problem
Ruslan Zasukhin
sunshine at public.kherson.ua
Sun Apr 3 23:42:04 CDT 2005
On 4/3/05 11:32 PM, "Kem Tekinay" <ktekinay at mactechnologies.com> wrote:
> I am having a problem with Union using the Class-way. The following code
> complains of a type mismatch error (expected VBitSet but got VSet):
>
> dim bs, bs1 as VBitSet
>
> bs = tbl.SelectNoneRecords // This is ok
> bs1 = tbl.fld.FindContains( something ) // This is ok
> if bs1 <> nil then bs = bs.Union( bs1 ) // Type mismatch error
Strange. VBitSet is subclass of Vset.
May be bug of RB ?
You can try this
if bs1 <> nil then
bs = bs.Union( (VSet) bs1 ) // Type mismatch error
> If I dim bs and bs1 as VSet instead, this works, but I don't know how to
> coerce bs into a VBitSet after that.
bs as VSet
bs1 as VBitset
To coerce one of syntaxes (not remember which one in RB works)
bs1 = VBitset( bs )
Or
bs1 = (Vbitset) bs
> The way the documentation reads, I should be able to do what I want to do as
> long as bs and bs1 are both of the same class. Have I missed something?
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list