You can have a uses clause in the Interface and implementation section of
the code.

So:
Form
  Interface
  Uses Component
  ...
  Implementation
  ...
  end.

Component
  Interface
  ...
  Implementation
  Uses Form
  ...
  end.

-----Original Message-----
From: Sergei Stenkov [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 2:44 PM
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Accessing Application components


Paul Spain wrote:

> VCL components should only be manipulated from the main
> thread context.
> TThread.Synchronize() provides this service for thread methods.
>
> >From your thread, call Synchronize(DisplayResponse) rather than
> DisplayResponse on its own.

Thank you Paul.
Yes, Synchronize is good for resolving conflicting thread issues, and I did
try it first using:
Synchronize(DisplayResponse) //DisplayResponse is a thread method

>From DisplayResponse I'd call a DisplayResponse method of the component,
which would add a string to a memo.

But, the problem was the same. The execution would go to:

        function SendMessage; external user32 name 'SendMessageA';

in Windows unit before it got into synchronised method, and it wouldn't
return.

I can't use a form's method since I can't have form's unit in component's
uses clause, because the form is already using the component (can I?).

Best regards,
Sergei

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to