Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Mar : Re: OnWork event handler not triggered ?...

www.cryer.info
Managed Newsgroup Archive

Re: OnWork event handler not triggered ?...

Subject:Re: OnWork event handler not triggered ?...
Posted by:"Adrien Reboisson" (adrien-reboissonatastasedotc..@knife.com)
Date:3 Mar 2006 02:21:44

Hi !

>The only way that can happen is if BeginWork() is not being called before
>DoWork().

I never call manually such functions.

>> Nevertheless, OnBeginWork is always called, as the
>> OnEndWork event handler.
>
>Then OnWork has to be guaranteed to be triggered as well.

With my demo project, you can check this :
- Open IdComponent and set a breakpoint in TIdComponent.DoWork
on the line "if FWorkInfos[AWorkMode].Level..."
- Run the project.

If AWorkMode = wmRead, the condition is always true and OnWork
is called.
If AWorkMode = wmRead, FWorkInfos[AWorkMode].Level = 0 and
OnWork is never called.

I don't see any problem in my code... Yes, it should work. But
it does not work :-)

Best regards,

A.R.

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive