Skip to content

Commit 09e7304

Browse files
committed
Merge pull request #883 from pandamicro/develop
Issues fix
2 parents dede507 + d4d0a93 commit 09e7304

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

frameworks/js-bindings/bindings/script/jsb_ext_create_apis.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ccui.Button.prototype.init = function(){
3232
};
3333
ccui.CheckBox.prototype.init = function(){
3434
ccui.Widget.prototype.init.call(this);
35-
this.setSelectedState(false);
35+
this.setSelected(false);
3636
this.setTouchEnabled(true);
3737
};
3838
ccui.LoadingBar.prototype.init = function(){
@@ -170,17 +170,11 @@ cc.TableView.prototype._ctor = function(dataSouurce, size, container){
170170
};
171171

172172
cc.EditBox.prototype._ctor = function(size, normal9SpriteBg, press9SpriteBg, disabled9SpriteBg){
173-
if (this.initWithSizeAndBackgroundSprite(size, normal9SpriteBg)) {
174-
if (press9SpriteBg)
175-
this.setBackgroundSpriteForState(press9SpriteBg, cc.CONTROL_STATE_HIGHLIGHTED);
176-
177-
if (disabled9SpriteBg)
178-
this.setBackgroundSpriteForState(disabled9SpriteBg, cc.CONTROL_STATE_DISABLED);
179-
}
173+
normal9SpriteBg && this.initWithSizeAndBackgroundSprite(size, normal9SpriteBg);
180174
};
181175

182176
cc.ScrollView.prototype._ctor = function(size, container) {
183-
container == undefined ? this.init() : this.initWithViewSize(size, container);
177+
size == undefined ? this.init() : (container ? this.initWithViewSize(size, container) : this.initWithViewSize(size));
184178
};
185179

186180

frameworks/js-bindings/bindings/script/jsb_property_apis.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ cc.defineGetterSetter(_proto, "titleFontColor", _proto.getTitleFontColor, _proto
565565
cc.defineGetterSetter(_proto, "pressedActionEnabled", _proto.getPressedActionEnabled, _proto.setPressedActionEnabled);
566566

567567
_proto = ccui.CheckBox.prototype;
568-
cc.defineGetterSetter(_proto, "selected", _proto.getSelectedState, _proto.setSelectedState);
568+
cc.defineGetterSetter(_proto, "selected", _proto.getSelected, _proto.setSelected);
569569

570570
_proto = ccui.Text.prototype;
571571
cc.defineGetterSetter(_proto, "boundingWidth", _proto._getBoundingWidth, _proto._setBoundingWidth);

samples/js-tests/src/CocosStudio2.0/UIFromCsb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ var CocosStudio2_UIFromCsb = (function(){
8383
layer._listMenu.setVisible(true);
8484
layer._backMenu.setVisible(true);
8585

86-
});
86+
}, this);
8787
}
8888
});
8989

0 commit comments

Comments
 (0)