<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=562330623-23112004><FONT face=Arial color=#0000ff 
size=2>Hmmm...not sure if this would work, or maybe I am missing the 
point.</FONT></SPAN></DIV>
<DIV><SPAN class=562330623-23112004><FONT face=Arial color=#0000ff size=2>But 
one of the things I need to do, and ommitted from my original email, is I need 
to add the data from a comport into a global variable until a #10 is received, 
THEN it process the data.</FONT></SPAN></DIV>
<DIV><SPAN class=562330623-23112004><FONT face=Arial color=#0000ff size=2>All 
the data I want to capture is preceeded with&nbsp; linefeed.</FONT></SPAN></DIV>
<DIV><SPAN class=562330623-23112004><FONT face=Arial color=#0000ff size=2>So if 
I use your theory Matt, would this still work?</FONT></SPAN></DIV>
<DIV><SPAN class=562330623-23112004><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=562330623-23112004><FONT face=Arial color=#0000ff 
size=2>Jeremy</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> 
  delphi-bounces@ns3.123.co.nz [mailto:delphi-bounces@ns3.123.co.nz] <B>On 
  Behalf Of </B>Matt Comb<BR><B>Sent:</B> Wednesday, 24 November 2004 
  10:25<BR><B>To:</B> NZ Borland Developers Group - Delphi 
  List<BR><B>Subject:</B> Re: [DUG] Multiple com ports<BR><BR></FONT></DIV>
  <DIV><FONT face=Arial size=2>Hi Jeremy, I would probably create a listener 
  thread which has your data processing routine in it or assigned to it, and 
  spawn it however many times you require.</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Matt.</FONT></DIV>
  <BLOCKQUOTE 
  style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
    <DIV 
    style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
    <A title=vss@vss.co.nz href="mailto:vss@vss.co.nz">Jeremy Coulter</A> </DIV>
    <DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@delphi.org.nz 
    href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</A> </DIV>
    <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, November 24, 2004 9:58 
    AM</DIV>
    <DIV style="FONT: 10pt arial"><B>Subject:</B> [DUG] Multiple com ports</DIV>
    <DIV><BR></DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>HI 
    all.</FONT></SPAN></DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>I have a 
    situation where I may need to have multiple comports monitored in an 
    app.</FONT></SPAN></DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>The number 
    comports could be from 1 (most common) to 4 to 8 or however 
    many.</FONT></SPAN></DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>I think I would 
    want to limit the number at some stage to say 8, but this is yet to be 
    decided.</FONT></SPAN></DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial 
    size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>Anyway, I can 
    dynamically create the comports and set their properties etc, thats ok, BUT 
    the problem I forsee is, when it comes to receiving 
data.</FONT></SPAN></DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>ATM I use Async 
    Pro created on the form, and have the event to handle the data coming in 
    created and assigned etc.</FONT></SPAN></DIV>
    <DIV><SPAN class=968515020-23112004>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>If I dynamically 
    create a control I prob. cant really assign the event to the same event at 
    the control that is created on the form, as it will prob. get data mixed up 
    etc.</FONT></SPAN></DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>So, what would 
    be the best way to handle this?</FONT></SPAN></DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>I guess I could 
    create 8 event handlers, but thats not exactly ideal.</FONT></SPAN></DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial 
    size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>Anyone got any 
    ideas?</FONT></SPAN></DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial 
    size=2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=968515020-23112004><FONT face=Arial size=2>Thanks, 
    Jeremy</FONT></SPAN></SPAN></DIV></DIV>
    <P>
    <HR>

    <P></P>_______________________________________________<BR>Delphi mailing 
    list<BR>Delphi@ns3.123.co.nz<BR>http://ns3.123.co.nz/mailman/listinfo/delphi<BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>