{"action":"created","issue":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15275","repository_url":"https://api.github.com/repos/cocos2d/cocos2d-x","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15275/labels{/name}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15275/comments","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15275/events","html_url":"https://github.com/cocos2d/cocos2d-x/issues/15275","id":141554917,"number":15275,"title":"[cocos2d-x-js][3.10] mismatch between JS and bindings","user":{"login":"murlock","id":250625,"avatar_url":"https://avatars.githubusercontent.com/u/250625?v=3","gravatar_id":"","url":"https://api.github.com/users/murlock","html_url":"https://github.com/murlock","followers_url":"https://api.github.com/users/murlock/followers","following_url":"https://api.github.com/users/murlock/following{/other_user}","gists_url":"https://api.github.com/users/murlock/gists{/gist_id}","starred_url":"https://api.github.com/users/murlock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murlock/subscriptions","organizations_url":"https://api.github.com/users/murlock/orgs","repos_url":"https://api.github.com/users/murlock/repos","events_url":"https://api.github.com/users/murlock/events{/privacy}","received_events_url":"https://api.github.com/users/murlock/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/labels/script:jsb","name":"script:jsb","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/28","html_url":"https://github.com/cocos2d/cocos2d-x/milestones/3.11","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/milestones/28/labels","id":1495945,"number":28,"title":"3.11","description":"","creator":{"login":"zilongshanren","id":785541,"avatar_url":"https://avatars.githubusercontent.com/u/785541?v=3","gravatar_id":"","url":"https://api.github.com/users/zilongshanren","html_url":"https://github.com/zilongshanren","followers_url":"https://api.github.com/users/zilongshanren/followers","following_url":"https://api.github.com/users/zilongshanren/following{/other_user}","gists_url":"https://api.github.com/users/zilongshanren/gists{/gist_id}","starred_url":"https://api.github.com/users/zilongshanren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zilongshanren/subscriptions","organizations_url":"https://api.github.com/users/zilongshanren/orgs","repos_url":"https://api.github.com/users/zilongshanren/repos","events_url":"https://api.github.com/users/zilongshanren/events{/privacy}","received_events_url":"https://api.github.com/users/zilongshanren/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":77,"state":"open","created_at":"2016-01-11T02:06:27Z","updated_at":"2016-03-18T09:05:58Z","due_on":"2016-03-30T16:00:00Z","closed_at":null},"comments":8,"created_at":"2016-03-17T11:25:00Z","updated_at":"2016-03-18T09:29:26Z","closed_at":null,"body":"At http://cocos2d-x.org/docs/api-ref/js/v3x/symbols/cc.MenuItemLabel.html, it show that class has getString() method to return the string of cc.MenuItemLabel\r\n\r\nIf you look at http://www.cocos2d-x.org/docs/api-ref/cplusplus/v3x/d5/dc4/classcocos2d_1_1_menu_item_label.html, this method doesn't exist.\r\n\r\nWhen using JS bindings, application will crash due to missing getString binding:\r\n\r\n<pre>\r\n        onEnter: function() {\r\n            item = new cc.MenuItemToggle(                               \r\n                new cc.MenuItemFont(getTranslation(\"ENGLISH\")),         \r\n                new cc.MenuItemFont(getTranslation(\"FRENCH\")),          \r\n                this.switchLanguage,                                    \r\n                this                                                    \r\n            );                                                          \r\n        },\r\n        switchLanguage: function (evt) {                                  \r\n            try {                                                         \r\n                var cur = evt.getSelectedItem();                          \r\n                cc.log(\"cur : \" + cur);                                   \r\n                cc.log(\"string: \" + cur.getString());                       \r\n            } catch (ex) {\r\n                cc.log(\"=> \" + ex.message);\r\n            } \r\n</pre>\r\nwill output\r\n<pre>\r\nE/Cocos2DX(14417): cur : [object MenuItemFont]\r\nE/Cocos2DX(14417): => cur.getString is not a function\r\n</pre>\r\n\r\n\r\nPlease remove getString from cocos2d-x-js or implementit on cocos2d-x :)\r\n\r\nRegards,\r\nMichael"},"comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments/198274546","html_url":"https://github.com/cocos2d/cocos2d-x/issues/15275#issuecomment-198274546","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/15275","id":198274546,"user":{"login":"murlock","id":250625,"avatar_url":"https://avatars.githubusercontent.com/u/250625?v=3","gravatar_id":"","url":"https://api.github.com/users/murlock","html_url":"https://github.com/murlock","followers_url":"https://api.github.com/users/murlock/followers","following_url":"https://api.github.com/users/murlock/following{/other_user}","gists_url":"https://api.github.com/users/murlock/gists{/gist_id}","starred_url":"https://api.github.com/users/murlock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murlock/subscriptions","organizations_url":"https://api.github.com/users/murlock/orgs","repos_url":"https://api.github.com/users/murlock/repos","events_url":"https://api.github.com/users/murlock/events{/privacy}","received_events_url":"https://api.github.com/users/murlock/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T09:29:26Z","updated_at":"2016-03-18T09:29:26Z","body":"Thanks guys :)\r\n\r\nDo I have to close the issue or it will be done with 3.11 release ?"}}