appcelerator/titanium_mobile — pull request #1977 by vishalduggal (2012-04-11 18:18:17+00:00)
Title: [TIMOB-8615] Safeguard against race conditions

Test is in [JIRA](https://jira.appcelerator.org/browse/TIMOB-8615)

The bug seems to be an apple bug where [actionSheet isVisible] always return false (Test device ipod 3rd gen running 4.0.2). So we were releasing the proxy twice. Once on the hide method and then when the user touched the button. Basically the PR safeguards against the release being called twice by checking the showDialog flag in the completeWithButton method