If you move focus and then speak a read line does it speak?

 

From: J.J. Meddaugh [mailto:[email protected]] 
Sent: Tuesday, February 08, 2011 12:43 PM
To: [email protected]
Subject: Re: Timing Issue

 

Yes. Results are downloaded, then the XML is parsed to populate the LV, and
then focus is moved to the LV.

 

----- Original Message ----- 

From: Jeff Bishop <mailto:[email protected]>  

To: [email protected] 

Sent: Tuesday, February 08, 2011 2:40 PM

Subject: RE: Timing Issue

 

Oh, I see. So, to be clear, your calling the code to fill the
listbox/listview or whatever it is <smile> and then setting focus?
Shouldn't the list be completed by that point?  The code you have is not
ASYNC.

 

From: J.J. Meddaugh [mailto:[email protected]] 
Sent: Tuesday, February 08, 2011 12:37 PM
To: [email protected]
Subject: Re: Timing Issue

 

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 <mailto:[email protected]>  

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 <mailto:[email protected]>  

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.

 

 

Reply via email to