-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
class function gets an error #12
Comments
@cyvoit That's an other bug, also fixed in 653074f |
Great! I still use example above. defineClass('JPViewController', {
handleBtn: function(sender) {
var tableViewCtrl = JPTableViewController.alloc().init();
self.navigationController().pushViewController_animated(
tableViewCtrl, YES)
console.log("self is " + self.description());
console.log(JPTableViewController.hello());
console.log("self is " + self.description());
}
}) It works and no errors. But called defineClass('JPViewController', {
handleBtn: function(sender) {
var tableViewCtrl = JPTableViewController.alloc().init();
console.log(JPTableViewController.hello());
console.log("self is " + self.description());
self.navigationController().pushViewController_animated(
tableViewCtrl, YES)
}
}) It logs: 2015-05-28 10:15:50.969 JSPatchDemo[10737:267688] JSPatch.log: hello
2015-05-28 10:15:50.970 JSPatchDemo[10737:267688] JSPatch.log: I'm JPTableViewController
2015-05-28 10:15:50.970 JSPatchDemo[10737:267688] JSPatch.log: self is JPTableViewController
2015-05-28 10:15:50.970 JSPatchDemo[10737:267688] +[JPTableViewController navigationController]: unrecognized selector sent to class 0x7fe9b2d2e0b0 |
@cyvoit Fixed, that's a stupid bug I made - -! Thank you! |
👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I add a class function
hello()
todemo.js
:And called
hello()
:hello()
works, (it prints logs,) but rises an error:I notice in #10 you said "By now, JSPatch can't add method to an OC class if the method not exists in OC". Thanks for your work~
The text was updated successfully, but these errors were encountered: