Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provisional fix for ticket #2170: regression in app events from webview on Android #9

Closed
wants to merge 1 commit into from

Commits on Oct 22, 2010

  1. Fix for ticket tidev#2170: calling Ti.App.fireEvent() from a web view…

    … context was broken on Android.
    
    The bindings for Ti.App in the webview had been creating a private AppModule instance to put event
    listeners on. This worked since each AppModule instance added itself to a list of proxies that
    accepted application-global events, and the AppModule had had its fireEvent() method overridden to
    instead dispatch events to whatever was in that list of proxies.
    
    Commit 7926eda removed that overridden fireEvent method (probably
    because of other changes in the framework), leaving the webview sending events just to itself. :)
    
    I changed the webview's bindings to pull up the actual live 'App' module instance instead of
    creating its own, so it just uses the standard event system. It appears to work in my testing
    updating StatusNet Mobile for the new 1.5 code; we send events back and forth between the main
    context and a web view to render a rich custom view, and to trigger actions from the HTML UI bits.
    bvibber committed Oct 22, 2010
    Configuration menu
    Copy the full SHA
    73a0224 View commit details
    Browse the repository at this point in the history