Macadamian/titanium_mobile — pull request #106 by jpl-mac (2012-07-17 14:17:58+00:00)
Title: TIMOB-9879 Blackberry: Implement UI.View.fireEvent

Reviewer: DaveC

Depends on PR #105

Also fixed in this patch
TIMOB-9545 BlackBerry: Implement Proxy

This patch implements the fireEvent functionality and moves it's implementation to TiProxy along with add/removeEventListener to match the documented structure and have them inherited by all inherited Titanium types

Changelog:
- framework path implemented for fireEvent
- Added EventPair struct to store the event container and handler for an event
- Track events in the NativeObject class
- Moved implementation to NativeObject and tested that event handling works well
- Made the nextEventId to be global for all events of the system and not per NativeObject
- moved fireEvent, add/removeEventListener to TiProxy
- applied changes to all NativeObjects that currently have event handling
- added support to delete the static singleton instances in Logger and String interfaces
- removed compiler warnings in NativeControlObject and NativeObject
- No apidoc needed, all of Proxy is now implemented and inherited in all other modules' yml

Tests: Tested on simulator
- add event listener for known event on objects that already handle events
- then call fireEvent with a hardcoded event
==> verified that the event listener is invoked, events can also be chained in that way

*NOTE: also tested with custom events, but these are currently not supported and support will need to be added as a separate task. Jira issue created https://jira.appcelerator.org/browse/TIMOB-9980