[V4RB 0000631]: VBitSet and VArraySet cannot use Union, Difference, Intersection, etc.

Kem Tekinay ktekinay at mactechnologies.com
Mon Apr 4 09:55:31 CDT 2005


On 4/4/05 9:45 AM, Ruslan Zasukhin at sunshine at public.kherson.ua wrote:

> Kem, but NOT exists just a Vset.
> 
> Vset -- this is abstract class. You cannot have objects of Vset class.
> 
> You can have only objects of VBitSet or VArraySet.

AAARRGGH!

Didn't you just tell me, in an e-mail this morning, that the way to use
Union was to assign it to a VSet??? In fact, you wrote:

> This line 
> 
>     bs = bs.Union( bs1 ) // Type mismatch error
> 
> Kem, this part is CORRECT
>     
>     bs.Union( bs1 )
> 
> Mistake is next. Union returns Vset. See docs above.
> So you must assign it to Vset.        <<<<<-----************
> This will work
> 
>  dim bs, bs1 as VBitSet
>  dim set as VSet 
> 
>  bs = tbl.SelectNoneRecords
>  bs1 = tbl.fld.FindContains( something )
>  if bs1 <> nil then
>     set = bs.Union( bs1 )
> 

So now I'm back to the problem I reported: Union returns a VSet, and there
is no way to turn that VSet into a VArraySet. Your recommendation does NOT
work:

> Correct line:
> 
>     arrSet = new VArraySet( VBitSet(set1) )

This results in an IllegalCastException.

__________________________________________________________________________
Kem Tekinay                                                 (212) 201-1465
MacTechnologies Consulting                              Fax (914) 242-7294
545 Eighth Avenue, Suite 401                          Pager (917) 491-5546
New York, New York 10018                    http://www.mactechnologies.com

To join the MacTechnologies Consulting mailing list, send an e-mail to:
  mactechnologies_consulting-subscribe at yahoogroups.com





More information about the Valentina mailing list