[lazarus] Another one bug add: TMemo & TListBox I/O errors?

Bogdan M.Maryniuck mbm at diprintas.lt
Wed Apr 26 09:52:39 EDT 2000


Ok, Marc.
Here is detailed answer:

begin
   readln(sometextfile,somestring);
   listbox.items.add(somestring);
end;

Here is all Ok -- I see my line there.

When I try to (just for fun):
begin
   readln(sometextfile,somestring);
   listbox.items.add(somestring);
   readln(sometextfile,somestring);
   listbox.items.add(somestring);
   readln(sometextfile,somestring);
   listbox.items.add(somestring);
   readln(sometextfile,somestring);
   listbox.items.add(somestring);
   readln(sometextfile,somestring);
   listbox.items.add(somestring);
end;

All RIGHT. And all OK.

But:
while not eof(sometextfile) do
begin
   readln(sometextfile,somestring);
   listbox.items.add(somestring);
end;

It's freezing a system. Do I need to add:
application.processmessages
into the LOOP? Or what?.. Please help.


----- Original Message -----
From: Marc Weustink <Marc.Weustink at cuperus.nl>
To: <lazarus at miraclec.com>
Sent: 26 àïðåëÿ 2000 ã. 5:47
Subject: RE: [lazarus] Another one bug add: TMemo & TListBox I/O errors?


> + From: Bogdan M.Maryniuck [mailto:mbm at diprintas.lt]
> +
> + Yes, it's work. Question is HOW.
> + For example:
> +
> + while not eof(sometextfile) do
> +    begin
> +       readln(sometextfile,someasciistring);
> +       listbox.items.add(someasciistring);
> +    end;
> +
> + ...hanging a system and _NOT_ load a lines into a listbox. :-(
>
> How many lines are you trying to add? Have you tried one ?
>
> Marc
>
>
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>     archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list