Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

继承父类的类方法不能被调用 #80

Closed
Kicheal opened this issue Aug 13, 2015 · 2 comments
Closed

继承父类的类方法不能被调用 #80

Kicheal opened this issue Aug 13, 2015 · 2 comments

Comments

@Kicheal
Copy link

Kicheal commented Aug 13, 2015

我项目里集成了JSONModel,我用JSPatch重新写了JSONModel的+ (JSONKeyMapper *)keyMapper
这个键映射方法,但是不能被调用
require('NSMutableDictionary, JSONKeyMapper')
defineClass('KeysModel',{
keyMapper :function(){
var add = NSMutableDictionary.alloc().init();
add.setObject_forKey('qqAppId','qqAppId');
var dict = JSONKeyMapper.alloc().initWithDictionary(ddd);

@bang590
Copy link
Owner

bang590 commented Aug 13, 2015

类方法是第二个参数

require('NSMutableDictionary, JSONKeyMapper')
defineClass('KeysModel', {}, {
  keyMapper :function(){
  }
})

@Kicheal
Copy link
Author

Kicheal commented Aug 13, 2015

好了,谢谢。

@bang590 bang590 closed this as completed Aug 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants