{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/pxt/issues/955","repository_url":"https://api.github.com/repos/Microsoft/pxt","labels_url":"https://api.github.com/repos/Microsoft/pxt/issues/955/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/pxt/issues/955/comments","events_url":"https://api.github.com/repos/Microsoft/pxt/issues/955/events","html_url":"https://github.com/Microsoft/pxt/issues/955","id":196559332,"number":955,"title":"event handlers with options should be error-free (as possible)","user":{"login":"tballmsft","id":10767146,"avatar_url":"https://avatars.githubusercontent.com/u/10767146?v=3","gravatar_id":"","url":"https://api.github.com/users/tballmsft","html_url":"https://github.com/tballmsft","followers_url":"https://api.github.com/users/tballmsft/followers","following_url":"https://api.github.com/users/tballmsft/following{/other_user}","gists_url":"https://api.github.com/users/tballmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/tballmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tballmsft/subscriptions","organizations_url":"https://api.github.com/users/tballmsft/orgs","repos_url":"https://api.github.com/users/tballmsft/repos","events_url":"https://api.github.com/users/tballmsft/events{/privacy}","received_events_url":"https://api.github.com/users/tballmsft/received_events","type":"User","site_admin":false},"labels":[{"id":315976360,"url":"https://api.github.com/repos/Microsoft/pxt/labels/bug","name":"bug","color":"fc2929","default":true},{"id":412085282,"url":"https://api.github.com/repos/Microsoft/pxt/labels/P1","name":"P1","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-20T00:56:34Z","updated_at":"2016-12-20T19:06:29Z","closed_at":null,"body":"With the new semantics of event-handlers as top-level only, we have the problem that if I drag \"on-button-pressed\" twice to the canvas, I get an error on the second handler, because the default value (button A) is the same as the first handler.\r\n\r\nWe should be smarter and recognize this situation, changing the option value of the newly added block (if possible) to a value not already present in the program.\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/pxt/issues/comments/268328952","html_url":"https://github.com/Microsoft/pxt/issues/955#issuecomment-268328952","issue_url":"https://api.github.com/repos/Microsoft/pxt/issues/955","id":268328952,"user":{"login":"pelikhan","id":4175913,"avatar_url":"https://avatars.githubusercontent.com/u/4175913?v=3","gravatar_id":"","url":"https://api.github.com/users/pelikhan","html_url":"https://github.com/pelikhan","followers_url":"https://api.github.com/users/pelikhan/followers","following_url":"https://api.github.com/users/pelikhan/following{/other_user}","gists_url":"https://api.github.com/users/pelikhan/gists{/gist_id}","starred_url":"https://api.github.com/users/pelikhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelikhan/subscriptions","organizations_url":"https://api.github.com/users/pelikhan/orgs","repos_url":"https://api.github.com/users/pelikhan/repos","events_url":"https://api.github.com/users/pelikhan/events{/privacy}","received_events_url":"https://api.github.com/users/pelikhan/received_events","type":"User","site_admin":false},"created_at":"2016-12-20T19:06:29Z","updated_at":"2016-12-20T19:06:29Z","body":"Note that this is not an error, it is just a warning. The program still compiles but the handler is ignored."}}
{"actor":{"display_login":"pelikhan"}}