[Lazarus] fragmented documentation causes lots of frustration

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Oct 5 09:27:55 CEST 2010


On Mon, 04 Oct 2010 11:04:48 +0100, Paulo Costa <paco at fe.up.pt> wrote:

>On 04/10/2010 07:17, Bo Berglund wrote:
>
>> Thanks for the suggestion! I have now installed the serial component
>> of the suite on my Ubuntu Lazarus.
>> As indicated there is an event for receiving the incoming data even
>> though that event does not tell how many characters are actually
>> available. So how do I know how many I can read in from the port?
>
>You don't need to know. When you are in the OnRxData event if you call 
>ReadData():
>
>procedure TForm1.SdpoSerial1RxData(Sender: TObject);
>var mess: string;
>begin
>   mess := SdpoSerial1.ReadData();
>   ...
>end;
>
>It will return a string with all available bytes in the input buffer.

Thanks, that explains it enough that I can move on! .-)

>> Should there not be an exception raised if the wanted port does not
>> exist?
>
>Yes. There is an exception that is raised when the open() call fails.

It looks like my virtual Ubuntu 10 thinks it has a serial port even
though none has been created by VMWare Workstation. Here is no
exception when I try to open it....


Bo Berglund





More information about the Lazarus mailing list