If async is the one where it waits until data is done, that's what I'm doing. You helped me write it, grin.
----- Original Message ----- From: Jeff Bishop To: [email protected] Sent: Tuesday, February 08, 2011 2:34 PM Subject: RE: Timing Issue Well, up to you. You could move when some data is there or wait until it finishes loading the data. You must be doing this using a async call some how then? From: J.J. Meddaugh [mailto:[email protected]] Sent: Tuesday, February 08, 2011 12:32 PM To: [email protected] Subject: Re: Timing Issue Jeff, But since I'm populating the list ahead of time, won't the script remain at that point and not move to the lines I posted until it's all populated? ----- Original Message ----- From: Jeff Bishop To: [email protected] Sent: Tuesday, February 08, 2011 2:27 PM Subject: RE: Timing Issue Do a do loop, checking for a count in the listview inside of it. Keep a count of itterations so you have a way out if nothing ever comes in. Do a sleep 10 (or whatever value) at the bottom of the do loop. Once you exit the loop then move focus and set selection. From: J.J. Meddaugh [mailto:[email protected]] Sent: Tuesday, February 08, 2011 12:15 PM To: [email protected] Subject: Timing Issue In the Blind Bargains Product Search app, there's an edit box for the user to type in a search phrase. Then, the results are loaded from the web and displayed in a listbox where focus is moved. Sometimes, however, the focus is moved and nothing is spoken. I'm thinking it's a timing issue of some sort. Should I move focus before the results are there or wait until they are for sure populated? Currently, the listview is populated, and then there's this: sleep 10 dObj.Control("lvResults").Focus dObj.Control("lvResults").Items(1).Focused = True I tried adding that sleep line above but to no avail. If I wish focus before the search is initiated, there's extraneous speech spoken (no selected item), etc. Thanks for any help.
