Macadamian/titanium_mobile — pull request #66 by dcampbell-macadamian (2012-05-25 14:42:38+00:00)
Title: TIMOB-8990: Ti functions don't work in event callbacks

Reviewers: David L, Alex

Description:
This patch fixes the problem of JS functions not calling back to the runtime. This patch calls "setVisible(false)" in the "clicked" event on the button object. In previous verions, this wouldn't work because it was never passed to the runtime.

Change Log:
- created a callback for Cascades message loop
- changed V8 scope so context doesn't go out of scope before events are handled
- application exits when a JS exception occurs

Test Cases:
- build tibb
- build tibbtest
- run tibbtest in simulator or device
- push the button - it should disappear

Note:
This patch addresses issues:
https://jira.appcelerator.org/browse/TIMOB-8990
https://jira.appcelerator.org/browse/TIMOB-9203