Created
December 16, 2012 06:32
-
-
Save Me1000/4303834 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation Foo : Bar | |
{ | |
id foo; | |
id x; | |
} | |
- (void)setFoo:(id)foo | |
{ | |
var blah = foo; | |
foo = blah; | |
var x = a; | |
x = 123; | |
} | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{var the_class = objj_allocateClassPair(Bar,"Foo"), | |
meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("foo"),new objj_ivar("x")]);objj_registerClassPair(the_class); | |
class_addMethods(the_class, [new objj_method(sel_getUid("setFoo:"), function(self, _cmd, foo) | |
{ | |
var blah = self.foo; | |
self.foo = blah; | |
var x = a; | |
self.x = 123; | |
}) | |
]);} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment