{"action":"created","issue":{"url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/347","labels_url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/347/labels{/name}","comments_url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/347/comments","events_url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/347/events","html_url":"https://github.com/mit-cml/appinventor-sources/pull/347","id":66037526,"number":347,"title":"Added multi/generic event handlers","user":{"login":"gitars","id":4552296,"avatar_url":"https://avatars.githubusercontent.com/u/4552296?v=3","gravatar_id":"","url":"https://api.github.com/users/gitars","html_url":"https://github.com/gitars","followers_url":"https://api.github.com/users/gitars/followers","following_url":"https://api.github.com/users/gitars/following{/other_user}","gists_url":"https://api.github.com/users/gitars/gists{/gist_id}","starred_url":"https://api.github.com/users/gitars/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitars/subscriptions","organizations_url":"https://api.github.com/users/gitars/orgs","repos_url":"https://api.github.com/users/gitars/repos","events_url":"https://api.github.com/users/gitars/events{/privacy}","received_events_url":"https://api.github.com/users/gitars/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":63,"created_at":"2015-04-03T00:09:40Z","updated_at":"2015-05-02T19:46:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mit-cml/appinventor-sources/pulls/347","html_url":"https://github.com/mit-cml/appinventor-sources/pull/347","diff_url":"https://github.com/mit-cml/appinventor-sources/pull/347.diff","patch_url":"https://github.com/mit-cml/appinventor-sources/pull/347.patch"},"body":"Stemming off of stuff from here:\r\nhttps://github.com/mit-cml/appinventor-sources/pull/313\r\n\r\nThis is a solution to this problem that works like this (copied from other pull request thread):\r\nBasically, we still have the \"multi-generic\" event handler that returns a the component when it is called, but we register it as a normal event to one of the components on the screen, under a different name such as \"MultiGeneric-\" + EventName. Then, when a normal event occurs, we check all the components to see if any of them have a event closure for \"MultiGeneric-\" + EventName. Then, we simply add the component that triggered the event to the list of arguments and dispatch it.\r\n\r\nExample. A screen with three buttons, and this block. All of the blocks will have their text changed on click.\r\n\r\n![screen shot 2015-04-02 at 8 10 31 pm](https://cloud.githubusercontent.com/assets/4552296/6976195/20773086-d974-11e4-88eb-b9cd063e5b76.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/comments/98391658","html_url":"https://github.com/mit-cml/appinventor-sources/pull/347#issuecomment-98391658","issue_url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/347","id":98391658,"user":{"login":"halatmit","id":789431,"avatar_url":"https://avatars.githubusercontent.com/u/789431?v=3","gravatar_id":"","url":"https://api.github.com/users/halatmit","html_url":"https://github.com/halatmit","followers_url":"https://api.github.com/users/halatmit/followers","following_url":"https://api.github.com/users/halatmit/following{/other_user}","gists_url":"https://api.github.com/users/halatmit/gists{/gist_id}","starred_url":"https://api.github.com/users/halatmit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halatmit/subscriptions","organizations_url":"https://api.github.com/users/halatmit/orgs","repos_url":"https://api.github.com/users/halatmit/repos","events_url":"https://api.github.com/users/halatmit/events{/privacy}","received_events_url":"https://api.github.com/users/halatmit/received_events","type":"User","site_admin":false},"created_at":"2015-05-02T19:46:21Z","updated_at":"2015-05-02T19:46:21Z","body":"Those log excerpts I included were the Android system log.  See  the App Inventor section on debugging:\r\n\r\nhttp://appinventor.mit.edu/explore/learn/live-development-testing-and-debugging.html\r\nIf you look in runtime.scm, you'll see uses of the comments android-log, that writes entries to the log.\r\nAnd you'll see Log.e used in the Java code similarly.\r\n\r\nYou'll also be wanting to look at the Java log.   And also be writing entries to the logs for debugging.  \r\n\r\n"}}