crash with MakeSearch
Ruslan Zasukhin
sunshine at public.kherson.ua
Sun Oct 26 01:49:24 CST 2003
on 10/25/03 22:57, Arthur Clemens at aclemens at xs4all.nl wrote:
> I have come across a bug (or is it a feature?) with MakeSearch, where I
> use the "=" operator with a search. Page 27 of VSDKReference.pdf says:
>
> 2) "[=] Value"
> This expression specifies an exact match to some value. For
> String/VarChar fields, if the
> sign "=" is absent then search returns all records which begins from
> specified string.
> Example: "=Ann" returns records which exact match to "Ann",
> "Ann" returns records records like "Ann", "Anndd", "Anngggg".
>
> I found that I get good results when I don't use the "=" operator.
> I also get good results when I use the "=" operator and there *is* and
> exact match in the database, but I get a crash when there is no exact
> match. In my test I have the words "mleko" and "mlin"; the crash occurs
> when searching with "=ml".
>
> void runTestsearch() {
> // 3 words in database: "mlin", "mleko", "apno"
> cout << "test 1... " << endl;
> testsearchSloveneWord("ml"); // fine: 2 results
> cout << "test 2... " << endl;
> testsearchSloveneWord("=mlin"); // fine: 1 result
> cout << "test 3... " << endl;
> testsearchSloveneWord("=ml"); // crash
> }
> void testsearchSloveneWord(const char* inText) {
> VDK_SearchTree* searchTree = new VDK_SearchTree();
> VDK_OR_Branch* searchBranch = new VDK_OR_Branch();
> searchBranch->SetCondition( mSloveneWord->GetField("Slovene word
> text"), inText );
> searchTree->Add_OR_Branch(searchBranch);
> FBL_BitSet* resultsBitset = mSloveneWord->MakeSearch( searchTree );
> cout << "number of results found for " << inText << " = " <<
> resultsBitset->GetCount() << endl;
> }
>
> (MacOS X, VSDK Framework)
Strange, may be in framework version glitch...
Can you modify example1 to reproduce this and send me modified .cpp file of
Example1.
I will test in CW at first. If works then in PB.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list