From af3691d2f2765106bbd331d2f4b34a0c56111521 Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Thu, 11 May 2017 17:15:31 +0800 Subject: [PATCH 1/3] remove unneeded warning msg --- cocos2d/core/components/CCToggleGroup.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cocos2d/core/components/CCToggleGroup.js b/cocos2d/core/components/CCToggleGroup.js index d738f1b4c5..bcf0c96edf 100644 --- a/cocos2d/core/components/CCToggleGroup.js +++ b/cocos2d/core/components/CCToggleGroup.js @@ -81,9 +81,7 @@ var ToggleGroup = cc.Class({ addToggle: function (toggle) { var index = this._toggleItems.indexOf(toggle); - if (index > -1) { - cc.warnID(4500); - } else { + if (index === -1) { this._toggleItems.push(toggle); } this._allowOnlyOneToggleChecked(); @@ -93,8 +91,6 @@ var ToggleGroup = cc.Class({ var index = this._toggleItems.indexOf(toggle); if(index > -1) { this._toggleItems.splice(index, 1); - } else { - cc.warnID(4501); } this._makeAtLeastOneToggleChecked(); }, From cee31521bd151b8fa20be2f1b2bbde586137688f Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Thu, 11 May 2017 17:17:07 +0800 Subject: [PATCH 2/3] remove debug msg --- DebugInfos.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/DebugInfos.js b/DebugInfos.js index c448fc0c7f..fc0d9ba179 100644 --- a/DebugInfos.js +++ b/DebugInfos.js @@ -364,9 +364,6 @@ if (CC_DEV) { "4300": "can not found the %s page.", //removePage //RichText: 4400 "4400": "Invalid RichText img tag! The sprite frame name can\'t be found in the ImageAtlas!", //_addRichTextImageElement - //ToggleGroup: 4500 - "4500": "Toggle alreay in ToggleGroup. Something bad happened, please report this issue to the Creator developer, thanks.", //addToggle - "4501": "Toggle is not in ToggleGroup. Something bad happened, please report this issue to the Creator developer, thanks.", //removeToggle //MissingScript: 4600 "4600": "Script attached to '%s' is missing or invalid.", //onLoad //EditBox: 4700 @@ -597,4 +594,4 @@ if (CC_DEV) { // } catch (e) { // cc._LogInfos = logs; -// } \ No newline at end of file +// } From b7da540af7418fedebbd04dee2e7ca90103ba70b Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Thu, 11 May 2017 17:17:47 +0800 Subject: [PATCH 3/3] remove warning msg from md --- EngineErrorMap.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/EngineErrorMap.md b/EngineErrorMap.md index e4b6606815..7f37e57b11 100644 --- a/EngineErrorMap.md +++ b/EngineErrorMap.md @@ -1288,14 +1288,6 @@ can not found the %s page. Invalid RichText img tag! The sprite frame name can't be found in the ImageAtlas! -### 4500 - -Toggle alreay in ToggleGroup. Something bad happened, please report this issue to the Creator developer, thanks. - -### 4501 - -Toggle is not in ToggleGroup. Something bad happened, please report this issue to the Creator developer, thanks. - ### 4600 Script attached to '%s' is missing or invalid.