code-dot-org/blockly — pull request #670 by cpirich (2014-06-12 23:07:43+00:00)
Title: [finishes #70480106]: fix saySprite and tickCount reset bugs

2 bugs:

(1) #70480106 was a simple case of not resetting the Studio.tickCount variable under the Run button was pressed. It makes sense to do this when the Reset button is pressed as well. The existing clearEventHandlersKillTickLoop() function now does this.

(2) If a saySprite() command was pending and another "thread" issued a saySprite() with the same actor, it would replace the speech bubble that was already up (by design). However, it cleared the timeout that would normally have called hideSpeechBubble(), which also cleaned up some state (notably, signaling that the command was complete and allowing execution of the first "thread" to continue). We now store the delegate hideSpeechBubble function with the sprite object, so we can call it manually if we're going to clear the timeout prematurely.

Related to that, cleaned up sprite array reset to clear all of the object properties.