FindValue does not return nil when no record found

Ruslan Zasukhin sunshine at public.kherson.ua
Thu May 11 14:50:29 CDT 2006


On 5/11/06 12:55 PM, "Joakim Schramm" <joakim at astrocalc.com> wrote:

> This is the problem, I can't reproduce it either when creating an example
> project, then it work as I think it should. Yet, in my production code this
> problem appear and I can't for my life see what possibly is different with
> the coding in my production code, compared to the example code - except
> there are much other code involved - but it doesn't involve this part. My
> only bet (hope) is that you can see in you Com/kernel code and "condition"
> that may result in return of an empty object set?
> 
> This is what happen, FindValue return an empty object instead of
> nil/nothing.
> 
> The only other thing I can think of is that there is something special in
> creation of my database file (or it's data) that causes this?
> 
> This as well a pain to code around as I can't test for nothing, instead I
> have to cast the VBitSet object to a VSet object and test for .Count = 0 or
> .IsEmpty = True BUT if it some case, under some circumstanse will return
> Nothing then that test will case an exception.
> 
> The strange thing is this:
> 
> Set bitLngPlaces = fLngDeg.FindValue(Longitude, bitPlaces) ' Return Empty
> object if not found
> 
> Set bitLngPlaces = fLngDeg.FindValue(Longitude) 'Return Nothing if not found

I see next ability. Confirm pleasE:

    bitPlaces = ...

        // it is not empty and not nil

    Set bitLngPlaces = fLngDeg.FindValue(Longitude, bitPlaces)

        // s2 = FindValue(Longitude) returns also non nil and not empty


but intersection of bitPlaces AND s2 => gives empty set.
Which you get.

Do you see such picture?

I think yes...


-- 
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