[solve] this.initWithTexture in IOS simulator report wrong number of arguments

the code is simple (i think)
keep getting wrong number of arguments for initWithTexture
also tried give cc.rect(0,0,480,320) as number 2 arguments. not working.
cocos2dx-2.2 jsb

var gMessageBase = cc.Sprite.extend({
ctor:function(){
this._super();
this.initWithTexture(cc.TextureCache.getInstance().textureForKey(“res/images/window.png”));

Cocos2d-x uses full path for key of texturecache.
So you needs to change your codes to
this.initWithTexture(cc.TextureCache.getInstance().getTextureForKey(cc.FileUtils.getInstance().fullPathForFilename("res/Images/window.png")));

Thanks James,

i can also get around it by using
var img = cc.TextureCache.getInstance().addImage(“res/images/window.png”);
this.initWithTexture(img);