Skip to content

Commit

Permalink
Merge pull request #531 from joshuastray/master
Browse files Browse the repository at this point in the history
issue #5527: fix jsb namespace bugs
  • Loading branch information
dingpinglv committed Jul 2, 2014
2 parents cb91f4d + 7c0c541 commit b1343d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frameworks/js-bindings/bindings/script/jsb_boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ cc.game._initConfig();

// JS to Native bridges
if(cc.sys.os == cc.sys.OS_ANDROID){
cc.reflection = new JavascriptJavaBridge();
jsb.reflection = new JavascriptJavaBridge();
cc.sys.capabilities["keyboard"] = true;
}
else if(cc.sys.os == cc.sys.OS_IOS){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ var AssetsManagerLoaderScene = TestScene.extend({
if (!this._am.getLocalManifest().isLoaded())
{
cc.log("Fail to update assets, step skipped.");
var scene = new jsb.AssetsManagerTestScene(backgroundPaths[currentScene]);
var scene = new AssetsManagerTestScene(backgroundPaths[currentScene]);
cc.director.runScene(scene);
}
else
Expand Down
2 changes: 1 addition & 1 deletion samples/js-tests/src/ReflectionTest/ReflectionTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var ReflectionTestLayer = BaseTestLayer.extend({

var label = cc.LabelTTF.create("Show Alert Dialog", "Arial", 35);
var menuItem = cc.MenuItemLabel.create(label, function(){
cc.reflection.callStaticMethod("org/cocos2dx/js_tests/AppActivity", "showAlertDialog", "(Ljava/lang/String;Ljava/lang/String;)V", "How are you ?", "I'm great !");
jsb.reflection.callStaticMethod("org/cocos2dx/js_tests/AppActivity", "showAlertDialog", "(Ljava/lang/String;Ljava/lang/String;)V", "How are you ?", "I'm great !");
}, this);
menuItem.x = winSize.width / 2;
menuItem.y = winSize.height / 2;
Expand Down

0 comments on commit b1343d6

Please sign in to comment.