NetTalk Central

Author Topic: TestWebClient freezing the app  (Read 11253 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
TestWebClient freezing the app
« 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
-----------
Regards
Alberto

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: TestWebClient freezing the app
« Reply #1 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.
Mike Grigsby
Credify Systems
Central Oregon, USA

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: TestWebClient freezing the app
« Reply #2 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

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: TestWebClient freezing the app
« Reply #3 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
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: TestWebClient freezing the app
« Reply #4 on: January 04, 2010, 05:00:38 AM »
Bruce, I´ve send you the files. (C71, NTWS5)
Have you received it?
Thanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: TestWebClient freezing the app
« Reply #5 on: January 05, 2010, 03:41:04 AM »
got it - thanks alberto.


Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: TestWebClient freezing the app
« Reply #6 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
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: TestWebClient freezing the app
« Reply #7 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

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: TestWebClient freezing the app
« Reply #8 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
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: TestWebClient freezing the app
« Reply #9 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
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: TestWebClient freezing the app
« Reply #10 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