Am Freitag, den 21.04.2006, 22:28 +0100 schrieb Ian bell:
> I am just starting to port some programs to fpc using Lazarus form 
> Tcl/Tk. I have some questions about things I can do fairly easily in 
> Tcl/Tk which I am not sure how to achieve in fpc/lazarus. At present I 
> only need Linux specific answers.
> 
> 1. I am connecting to an external microcontoller development board by 
> a serial interface. I need to be able to set this interface non 
> blocking. I can see how to open the serial interface using the serial 
> unit but it is not clear how to set it non blocking.

For Linux/*nix there is the "serial" unit, does something similar here.
See

<fpc-source-dir>/rtl/unix/serial.pp

> 2. I need to respond to the occurence of input on the serial port. 
> This is trivial in Tcl - fileevent FileDescriptor FunctionName - how 
> do I achieve this in fpc?

Hum, not sure about this, but maybe a "select" on the port will help?
Another possibility would be to watch the status lines (in a separate
thread if necessary) or simply the input data ... depend on what event
you're waiting for.

> 3. In Tcl/Tk I use a textarea widget with keyboard entry disabled to 
> show progress and data. The nearest equivalent in LCL seems to be 
> TMemo. How do I disable keyboard input to this and where can I find 
> documentation on this and other) components - the wiki seems fairly 
> silent on this or do I just assume it work like a Delphi TMemo?

I think setting the property "ReadOnly" to TRUE should do.

Most people seem to use Delphis docs because they have used it before
trying fpc/lazarus. For the basics mostly any doc about Delphi/Object
Pascal would do (from the web, cheap books, ...).

HTH,
Marc


_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to