NetTalk Central
		The Rest Of NetTalk => The Rest - Ask For Help => Topic started 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
- 
				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.
			
- 
				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
- 
				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
- 
				Bruce, I´ve send you the files. (C71, NTWS5)
 Have you received it?
 Thanks
 Alberto
- 
				got it - thanks alberto.
 
 
- 
				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
- 
				>> 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
 
- 
				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
- 
				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
- 
				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