Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #12963 > unrolled thread

DataWindow frozen when consuming webservice

Started byccyasa.sbassano@gmail.com
First post2020-04-30 11:20 -0700
Last post2020-05-04 04:43 -0700
Articles 3 — 2 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  DataWindow frozen when consuming webservice ccyasa.sbassano@gmail.com - 2020-04-30 11:20 -0700
    Re: DataWindow frozen when consuming webservice "Wolfgang Riedmann" <wriedmann@gmail.com> - 2020-05-01 17:02 +0200
      Re: DataWindow frozen when consuming webservice ccyasa.sbassano@gmail.com - 2020-05-04 04:43 -0700

#12963 — DataWindow frozen when consuming webservice

Fromccyasa.sbassano@gmail.com
Date2020-04-30 11:20 -0700
SubjectDataWindow frozen when consuming webservice
Message-ID<07757019-6f9c-4d92-98dc-aa13a8b468da@googlegroups.com>
Hi, i have a simple DataWindow with a ProgressBar and a PushButton.
When the button is pressed a webservice is consumed. That operation takes between 1 and 10 seconds, depending on internet speed. During that time the window is frozen.
I need that while the operation take places the progressbar show progress.
When the button is pressed i start progress, consume the webservice, and stop progress. This isn't noticeable because all freeze until the service is consumed.
I try setting a timer on the object that consume the webservice and then in the dispatch method of the datawindow add the lines:
  oProgressBar:Advance(1)
  ApplicationExec(ExecWhileEvent)

with no luck, i log data to test if the lines are reached an yes, they are.
Also try the same but instead of the datawindow use the progressbar, same that above.
The object that consumes a webservice is a COM object.
There is an easy way to achieve this? I prefer not to use threads.
Thanks in advance.

Sebastián

[toc] | [next] | [standalone]


#12967

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2020-05-01 17:02 +0200
Message-ID<hh2s14FabdoU1@mid.individual.net>
In reply to#12963
Hi Sebastiàn,

I'm sorry, but without threads that cannot work.

The only alternative would to spawn a separate exe that writes to a
file and your program reads that file when it is present (in fact, this
is a sort of poor mans multithreading).

Wolfgang

ccyasa.sbassano@gmail.com wrote:

> Hi, i have a simple DataWindow with a ProgressBar and a PushButton.
> When the button is pressed a webservice is consumed. That operation
> takes between 1 and 10 seconds, depending on internet speed. During
> that time the window is frozen.  I need that while the operation take
> places the progressbar show progress.  When the button is pressed i
> start progress, consume the webservice, and stop progress. This isn't
> noticeable because all freeze until the service is consumed.  I try
> setting a timer on the object that consume the webservice and then in
> the dispatch method of the datawindow add the lines:
> oProgressBar:Advance(1)   ApplicationExec(ExecWhileEvent)
> 
> with no luck, i log data to test if the lines are reached an yes,
> they are.  Also try the same but instead of the datawindow use the
> progressbar, same that above.  The object that consumes a webservice
> is a COM object.  There is an easy way to achieve this? I prefer not
> to use threads.  Thanks in advance.
> 
> Sebastián



-- 

[toc] | [prev] | [next] | [standalone]


#12972

Fromccyasa.sbassano@gmail.com
Date2020-05-04 04:43 -0700
Message-ID<43916edf-775a-4a8d-9eb5-a3567fca0b93@googlegroups.com>
In reply to#12967
Thanks Wolfgang, i imagined that but i have to try!

Sebastián

El viernes, 1 de mayo de 2020, 12:03:02 (UTC-3), Wolfgang Riedmann escribió:
> Hi Sebastiàn,
> 
> I'm sorry, but without threads that cannot work.
> 
> The only alternative would to spawn a separate exe that writes to a
> file and your program reads that file when it is present (in fact, this
> is a sort of poor mans multithreading).
> 
> Wolfgang
> 
> Sebastián wrote:
> 
> > Hi, i have a simple DataWindow with a ProgressBar and a PushButton.
> > When the button is pressed a webservice is consumed. That operation
> > takes between 1 and 10 seconds, depending on internet speed. During
> > that time the window is frozen.  I need that while the operation take
> > places the progressbar show progress.  When the button is pressed i
> > start progress, consume the webservice, and stop progress. This isn't
> > noticeable because all freeze until the service is consumed.  I try
> > setting a timer on the object that consume the webservice and then in
> > the dispatch method of the datawindow add the lines:
> > oProgressBar:Advance(1)   ApplicationExec(ExecWhileEvent)
> > 
> > with no luck, i log data to test if the lines are reached an yes,
> > they are.  Also try the same but instead of the datawindow use the
> > progressbar, same that above.  The object that consumes a webservice
> > is a COM object.  There is an easy way to achieve this? I prefer not
> > to use threads.  Thanks in advance.
> > 
> > Sebastián
> 
> 
> 
> --

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web