Skip to content

Instantly share code, notes, and snippets.

@Me1000
Created December 16, 2012 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Me1000/4303834 to your computer and use it in GitHub Desktop.
Save Me1000/4303834 to your computer and use it in GitHub Desktop.
@implementation Foo : Bar
{
id foo;
id x;
}
- (void)setFoo:(id)foo
{
var blah = foo;
foo = blah;
var x = a;
x = 123;
}
@end
{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