DataAvailable fires with as few as one characters. You need to put them into a buffer and watch for the EOL. This tends to be characteristic of serial ports. It's not yet clear too me whether or not this is also characteristic of USB-Serial converter systems as I have not tried it yet.

Jim


On Apr 23, 2006, at 8:59 AM, Emile Schwarz wrote:

Hi,

REALbasic 2005r4 Pro
Mac OS X 10.4.6 on PowerBook G4 15" Alu (8-2004)

brand new project,
add a serial control in the window
put in the Window.Open:
add a ListBox (call it LBModem, set it to 5 Columns - same results with 3 columns earlier)

LBModem.AddRow ""
serial1.Write "ATI0" + EndOfLine.Windows

in Serial1.DataAvailable put:

LBModem.Cell(LBModem.LastIndex,2) = Me.ReadAll(Encodings.UTF8)  // *

Run and you get wrong entries in the Cells; sometimes all info goes on one Cell (ATI0960OK), sometimes all ifos goes to the correct cells (ATI0,960,OK).


Any idea ?


Emile


PS: why DataAvailable is fired so many times after a single call ?



* Same results without encodings

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to