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

Kem Tekinay ktekinay at mactechnologies.com
Mon Apr 4 14:36:18 CDT 2005


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

> I have told that Union() returns Vset.
> 
> This is very logical, because Union() works for both, VBitSet and VArraySet.
> So we return the Vset class which is parent of both.

Ruslan,

We seem to be going around in a circle, so let me see if I can summarize
this issue:

- Doing a Find (like fld.FindStartsWith) returns a VBitSet.

- Doing a Union with the results of that find (bs.Union(bs1)) returns a
VSet.

- Once you have the VSet, you cannot convert it back to a VBitSet or a
VArraySet.

If I am wrong, please provide the code that searches one field, searches
another field, combines the results of those searches (Union), and then
returns the result as a VArraySet.

It seems to me that the problem is that Union returns VSet, an abstract
class that we really shouldn't be using. Ideally it would return the same
class as was used in the Union, or, at least, a VBitSet so we can convert
that to a VArraySet if necessary.

I have already sent you a project illustrating this, but I will soon send
another, better one.

__________________________________________________________________________
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