FindValue does not return nil when no record found

Joakim Schramm joakim at astrocalc.com
Thu May 11 14:24:11 CDT 2006


 

> -----Original Message-----
> From: valentina-bounces at lists.macserve.net 
> [mailto:valentina-bounces at lists.macserve.net] On Behalf Of 
> Ruslan Zasukhin
> Sent: 11 May 2006 13:50
> To: valentina at lists.macserve.net
> Subject: Re: Re[2]: FindValue does not return nil when no record found
> 
> 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...
> 
You mean I search with var Longitude for a value that exists, first with
bitPlaces as "limiter" and then with just Latitude, then make an
intersection of the 2?

I get .count = 664 (out of 5047)

.IsEmpty = False

Or have I missunderstood?

Joakim
> 
> --
> 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]
> 
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> 



More information about the Valentina mailing list