[V4RB2] FindStartsWith crashes app
Ruslan Zasukhin
sunshine at public.kherson.ua
Sun Apr 3 11:05:14 CDT 2005
On 4/3/05 5:27 AM, "Kem Tekinay" <ktekinay at mactechnologies.com> wrote:
> On 4/2/05 4:18 PM, Ruslan Zasukhin at sunshine at public.kherson.ua wrote:
>
>> So you mean that crash if PARAMETER of FindStartsWith() is null ?
>
> No. If FindStartsWith does not find any matches, it returns nil.
>
> For example, if my data has "123" and "1234" in it, and I use
> fld.FindStartsWith("123"), I get a good VSet. But fld.FindStartsWith("567")
> returns nil.
>
> If I use fld.FindContains("888"), I properly get an empty VSet.
Actually FindContains() also should return nil.
It is better because then we eat LESS Memory.
And we do not spend time to create/delete set objects.
> The crash occurs is I try a Union with nil. For example, where bs is a valid
> VSet, bs.Union(nil) will crash.
Kem,
It is YOUR responsibility to check nil pointers.
But yes, bs.Union(nil) should not crash.
Ivan fix this right now
--
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