NetTalk Central

The Rest Of NetTalk => The Rest - Ask For Help => Topic started by: Alberto on December 30, 2009, 02:24:52 PM

Title: TestWebClient freezing the app
Post by: Alberto on December 30, 2009, 02:24:52 PM
Hi,
I need to read data from some web pages.
For this porpouse I use the TestWebClient proc of the Demo Nettalk app.
I´ve modified it, hiding the window and commenting all diplaying lines.
It works ok.
Now I need to run the read process in the background.
Then I create a window proc with a timer that calls the TestWebClient proc.
I START that hidden window proc from the Frame but...
each time the timer calls the TestWebClient the entire app frezes until the read proces finished.
What am I doing wrong?
Thanks and happy new year!!!!
Alberto
Title: Re: TestWebClient freezing the app
Post by: Mike Grigsby on December 31, 2009, 02:18:56 AM
Hi Alberto, I won't be at my computer for a few days to dig up an example, but I think Bruce has a fairly new example that uses the Yield statement to do something similar. I actually was able to build a pretty slick "live" progress bar using this technique.
Title: Re: TestWebClient freezing the app
Post by: Bruce on December 31, 2009, 04:41:09 AM
Perhaps you need to post an example here Alberto.

It's hard to comment on what you've done wrong without being able to see the code.

cheers
Bruce
Title: Re: TestWebClient freezing the app
Post by: Alberto on December 31, 2009, 05:19:26 AM
Ok, Bruce. no problem, but I need to sedn you the original app, it is pretty short.
Please, send me an emal so I can reply it attaching the files.
Thanks
Alberto
Title: Re: TestWebClient freezing the app
Post by: Alberto on January 04, 2010, 05:00:38 AM
Bruce, I´ve send you the files. (C71, NTWS5)
Have you received it?
Thanks
Alberto
Title: Re: TestWebClient freezing the app
Post by: Bruce on January 05, 2010, 03:41:04 AM
got it - thanks alberto.

Title: Re: TestWebClient freezing the app
Post by: Alberto on January 15, 2010, 12:37:18 PM
Bruce,
It worked ok with the MDI window attribute but...
Every time the proc is called, (the window is hidden) the actual window looses its focus, I´ve tryed everithing but it stoles the focus.
Is there any way to concert the proc in a source proc?
I´ve been trying but I think the problem is to RETURN from the source proc from inside a procedure, once the page is loaded.
May you please give me a hand?
THanks
Title: Re: TestWebClient freezing the app
Post by: Bruce on January 17, 2010, 10:47:55 PM
>> Is there any way to [create?] the proc in a source proc?

no, you need an Accept loop because the comms is Event driven.

If you set the window with the Toolbar attribute, or
after the window is opened set
0{prop:active} = 0
then I think it won't grab the focus.

Cheers
Bruce
Title: Re: TestWebClient freezing the app
Post by: Alberto on January 18, 2010, 03:38:35 AM
Hi Bruce,

The toolbar attribute make the app to freeze, like when it had not the MDI attribute.
The prop:active does not work.
I´ve tried posting an event:gainfocus to the browse but it does not work either.
Any other idea?
Thanks
Alberto
Title: Re: TestWebClient freezing the app
Post by: Alberto on March 09, 2010, 12:03:44 PM
Bruce, coming back to this problem...

I´m calling the TestWebClient proc with another proc for it to read some web pages.
Then the calling proc parses it and fill a table with the data.
How can I do it inside the TestWebClient proc?
My idea is that the TestWebClient proc has a timer and from the timer call one by one a list of pages, parse it and fill the table.
Is there any way to do it?

Thanks
Alberto
Title: Re: TestWebClient freezing the app
Post by: Bruce on March 09, 2010, 10:25:19 PM
It sounds to me like your calling proc should just have a web client class inside itself rather than calling off to another (synchronous) procedure.

cheers
Bruce