<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<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> </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> </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> </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> </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></BODY></HTML>