Article View: borland.public.cppbuilder.internet.socket
Article #1349Re: socket issue
From: mat
Date: Sat, 10 Feb 2007 17:41
Date: Sat, 10 Feb 2007 17:41
31 lines
1967 bytes
1967 bytes
im using the tscoketconnection component from the datasnap tool categorie to
connect to
a datasnap server(builder 2006).
> You should not be calling Application->ProcessMessages() in a worker
> thread.
but if i dont call this in the thread when i want to show something in a
label in the main
thread(form) then it doesnt show up,eg:(all this in my separate thread):
MainForm->Label1->Caption="connecting...";
Application->ProcessMessages();
DataModule->SocketConnection1->Connected=true;
if i dont put the processmessages it doesnt show the label.
concerning the sychronous-asychronous mode,i dont know how to change this in
the
component im using.
maybe im using the thread in a wrong way in the first place.i have created a
thread to do
the connecting but this new thread accesses a component(socket
connection)from
a datamodule.is this the reason that it forces the program to freeze?
eg:
Mythread::Connect()
{
DataModule->SocketConnection->Connected=true;
}
Technical Details
Message-ID:
<45ce03ae$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<45cbd7c8$1@newsgroups.borland.com> <45ccbf29$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,54a50302c070b08c X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "mat" <mat@hotmail.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <45cbd7c8$1@newsgroups.borland.com> <45ccbf29$1@newsgroups.borland.com> Subject: Re: socket issue Date: Sat, 10 Feb 2007 17:41:08 -0000 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 131.227.231.116 Message-ID: <45ce03ae$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1171129262 131.227.231.116 (10 Feb 2007 09:41:02 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail