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

Kem Tekinay ktekinay at mactechnologies.com
Mon Apr 4 09:40:21 CDT 2005


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

> I think this is false report.
> We have all you need.
> 
> In the examples I was able do everything I was need.
> 
> ANSWER: 
> 
>     you can convert bitset into ArraySet using constructor
>     of class ArraySet
> 
>             ArraySet( inBitSet as VBiteSet )
> 
> Exmaple
> 
>     dim bs as VBitSet
>     dim as as VArraySet
> 
>         bs = fld.find( something )
> 
>         as = new VarraySet( bs )

No, no, not a VBitSet into a VArraySet. I know that works, but that's NOT
the report.

I can't turn a *VSET* into a VArraySet. How do I get the VSet returned by
Union, Difference, etc., into a VArraySet?

The example above should be:


  dim bitset1, bitset2 as VBitSet
  dim set1 as VSet
  dim arrSet as VArraySet

  bitset1 = fld.FindStartsWith( something )
  bitset2 = fld.FindStartsWith( somethingElse )

  set1 = bitset1.Union( bitset2 ) // So far, so good

  arrSet = VArraySet( set1 ) // IllegalCastException at runtime
  arrSet = new VArraySet( set1 ) // Wrong type of parameter


And, frankly, this seems the wrong behavior anyway. If I create a Union
between two VArraySet, why should my result be a VSet rather than a
VArraySet? This is especially true since the VSet is an abstract class
according to the Kernel reference.

I'm sorry if I'm being a pain about this, but the only solution I can come
up with is to create a VSetIterator and place all the recIDs into my own
array, but that seems like a slow way to do it.

__________________________________________________________________________
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