Topics

delayed character descriptions. #addonrequestreview

Luke Davis
 

On Tue, 17 Sep 2019, Cyrille via Groups.Io wrote:

Regarding global variable not been set, I have not seen any strange user experience.
I must have missed something about a global variable not being set.

Luke

Cyrille
 

Hello
In NVDA 2019.2, the cancelSpeech function is defined as follows:
### Start of code
def cancelSpeech():
    """Interupts the synthesizer from currently speaking"""
    global beenCanceled, isPaused, _speakSpellingGenerator
    # Import only for this function to avoid circular import.
    import sayAllHandler
    sayAllHandler.stop()
    speakWithoutPauses._pendingSpeechSequence=[]
    speakWithoutPauses.lastSentIndex=None
    if _speakSpellingGenerator:
        _speakSpellingGenerator.close()
    if beenCanceled:
        return
    elif speechMode==speechMode_off:
        return
    elif speechMode==speechMode_beeps:
        return
    getSynth().cancel()
    beenCanceled=True
    isPaused=False
### End of code

The line that causes the exception when it occurs is:
_speakSpellingGenerator.close()
In case of exception the code after this line may not be executed. The global variable I was talking of are beenCanceled and isPaused.
Cyrille
----- Mail d'origine -----
De: Luke Davis <luke@...>
À: nvda-addons@nvda-addons.groups.io
Envoyé: Tue, 17 Sep 2019 12:01:50 +0200 (CEST)
Objet: Re: [nvda-addons] delayed character descriptions. #addonrequestreview

On Tue, 17 Sep 2019, Cyrille via Groups.Io wrote:
> Regarding global variable not been set, I have not seen any strange user experience.
I must have missed something about a global variable not being set.
Luke