FindLinked and FindLinkedAsBitSet inconsistency
Ruslan Zasukhin
sunshine at public.kherson.ua
Wed May 10 12:16:03 CDT 2006
On 5/10/06 11:54 AM, "Joakim Schramm" <joakim at astrocalc.com> wrote:
> Why?
>
> FindLinked() - Returns ArraySet
> FindAllLinked - Returns BitSet
>
> Look at this part in my code
> If mCountryID <> 0 Then
> Set Col = mLink.FindLinked(mCountryID, tCountry, tPlaces)
> Else
> Set Col = mLink.FindAllLinked(tCountry, tPlaces)
> End If
Must be as:
again!! Use normal names for variables!!!
you are not in CIA, yes? :-)
If mCountryID <> 0 Then
arrsLinkedPlaces = mLink.FindLinked(mCountryID, tCountry, tPlaces)
bitsLinkedPlaces = VBitSet
bitsLinkedPlaces.InitWithArray( arrsLinkedPlaces )
arrsLinkedPlaces = nil
Else
bitsLinkedPlaces = mLink.FindAllLinked(tCountry, tPlaces)
End If
Yes at least to get comforting codding we need add something like
If mCountryID <> 0 Then
bitsLinkedPlaces = mLink.FindLinkedAsBitSet(mCountryID, tCountry,
tPlaces)
Else
bitsLinkedPlaces = mLink.FindAllLinked(tCountry, tPlaces)
End If
> I search places in either 1 or all countries and I want result in same
> object for later processing. Now I have use a Vset object (Col) to obtain
> this. If in next step I need an Array object I need to make a (unnecessary)
> conversion and it complicates my code. Ok I know, I can leave Col as nil
> just, but this may not always be convinient.
>
> I here process further, all these Find functions returns BitSet, except 2
> being alternative. My point is the mix of ArraySet and BitSet for returned
> result makes theres functions harder and more complex to use together. It
> forces me to write extra, unnecessary I think, code.
>
> If ExactSearch <> 0 Then
> Set Res = fPlace.FindValueAsArraySet(PlaceName, Col)
> Else
> Set Res = fPlace.FindContains(PlaceName, Col)
> End If
>
> If there was ArraySet and BitSet alternatives for them all it is fine, but
> now it isn't.
>
> This is my point. I might be wrong or am missing something as I am still new
> to this tool.
--
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