{"action":"closed","issue":{"url":"https://api.github.com/repos/peteonline/ClassyJS/issues/33","labels_url":"https://api.github.com/repos/peteonline/ClassyJS/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/peteonline/ClassyJS/issues/33/comments","events_url":"https://api.github.com/repos/peteonline/ClassyJS/issues/33/events","html_url":"https://github.com/peteonline/ClassyJS/issues/33","id":65501196,"number":33,"title":"Event arguments should not be provided in an array","user":{"login":"peteonline","id":1554357,"avatar_url":"https://avatars.githubusercontent.com/u/1554357?v=3","gravatar_id":"","url":"https://api.github.com/users/peteonline","html_url":"https://github.com/peteonline","followers_url":"https://api.github.com/users/peteonline/followers","following_url":"https://api.github.com/users/peteonline/following{/other_user}","gists_url":"https://api.github.com/users/peteonline/gists{/gist_id}","starred_url":"https://api.github.com/users/peteonline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peteonline/subscriptions","organizations_url":"https://api.github.com/users/peteonline/orgs","repos_url":"https://api.github.com/users/peteonline/repos","events_url":"https://api.github.com/users/peteonline/events{/privacy}","received_events_url":"https://api.github.com/users/peteonline/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/peteonline/ClassyJS/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-31T17:11:25Z","updated_at":"2015-04-17T14:05:12Z","closed_at":"2015-04-17T14:05:12Z","body":"When an event is triggered, currently the second argument is an array of arguments to pass to bound methods. It would be more pleasant if we just supplied as many arguments as were required after the name of the event.\r\n\r\n```javascript\r\ndefine(\r\n\r\n'class Model',\r\n{\r\n    \r\n    'public event change (string, Model)': undefined,\r\n    \r\n    'private myProperty (string)': null,\r\n    \r\n    'public setProperty (string) -> undefined': function(value)\r\n    {\r\n        this.myProperty(value);\r\n        this.trigger('change', [value, this]);\r\n        // Surely this would be better...\r\n        // this.trigger('change', value, this);\r\n    },\r\n    \r\n    'public getProperty () -> string': function()\r\n    {\r\n        return this.myProperty();\r\n    }\r\n    \r\n});\r\n```\r\n\r\nThis would also make #32 redundant."}}