[TIMOB-581] cannot add synthetic events to window
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:53:34.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M09 |
Components | iOS |
Labels | events, ios, release-1.6.0, synthetic, ui, window |
Reporter | Noah |
Assignee | Reggie Seagraves |
Created | 2011-04-15T02:32:25.000+0000 |
Updated | 2011-04-17T01:53:34.000+0000 |
Description
The documentation for window suggests you can add an fire a synthetic event for a window.
See bottom of:
https://developer.appcelerator.com/apidoc/mobile/1.0/Titanium.UI.Window">
https://developer.appcelerator.com/apidoc/mobile/1.0/Titanium.UI.Wi...
However, the following example app.js does not work:
http://gist.github.com/335896">http://gist.github.com/335896
The only synthetic events I've been able to successfully add/fire have been global application ones (Ti.App.addEventListener...). This however, has its own architectural issues namely, that you are now responsible for tearing it down yourself.
Tested against iphone simulator.
+1 for this ticket
This ticket has been duplicated at #536. I propose that #536 be closed, as #581 explains the problem in more simple terms.
Thanks for following up on this ticket. Enough time has passed that I'm not certain whether or not this is an issue for more current releases of titanium. If I recall correctly, my concern at the time was there were cases where registering/deregistering a global event listener became non-trivial (a global event would register itself twice and tearing it down involved adding another event listener and a handle to the listener) whereas the convenience of a window is that it manages its own lifecycle.
Noah
Yes, I agree, it would be a useful facility.
I can confirm that, for the latest build (dated 2nd Oct) on Android emulator at least, this bug still exists.
See #2018 for the android ticket/fix
Tested against 1.6.0 RC1 for iOS. Checked test into bugtests.
Associated Helpdesk Ticket
Waiting for docs
http://developer.appcelerator.com/helpdesk/view/76560">http://developer.appcelerator.com/helpdesk/view/76560