[yunqa.de] Re: Newbie still struglling with DISQLite 3

dogo wrote:


>I've been playing with the stringlist demo, and have modified it a bit.. No
>doubt I have made it Worst :-( what I am now trying to do is match the text
>from the edit1.textbox to an item in my string list, but I am having no luck
>could someone point me in the right direction.

I agree, your problem is not due to DISQLite3, in fact your procedure does not 
even use any DISQLite3 functionality.

>procedure TfrmStringList.FindBtnClick(Sender: TObject);
>var
>  i: Integer;
>begin
>  for i := 0 to MyStringList.Count - 1 do
>  begin
>    if MyStringList.IndexOfname(Edit1.Text) = -1 then
>      ShowMessage('Found');
>  end;
>end;

MyStringList.IndexOfname() is probably wrong. Instead, try 
MyStringList.IndexOf() like in the following procedure (untested):

procedure TfrmStringList.FindBtnClick(Sender: TObject);
begin
  if MyStringList.IndexOf(Edit1.Text) >= 0 then
    ShowMessage('Found');
end;

Ralf 

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
http://www.freelists.org/list/yunqa



Other related posts: