2002-05-31 06:02:26 +00:00
|
|
|
@interface Foo : Object
|
2004-11-02 07:13:00 +00:00
|
|
|
{
|
|
|
|
integer x;
|
|
|
|
}
|
2002-05-31 06:02:26 +00:00
|
|
|
-run;
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@implementation Foo
|
|
|
|
|
2004-11-11 00:34:00 +00:00
|
|
|
+load
|
|
|
|
{
|
|
|
|
print ("+load\n");
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
2004-11-02 07:13:00 +00:00
|
|
|
+alloc
|
|
|
|
{
|
|
|
|
print ("+alloc\n");
|
|
|
|
return class_create_instance (self);
|
|
|
|
}
|
|
|
|
|
|
|
|
-init
|
|
|
|
{
|
|
|
|
print ("-init\n");
|
|
|
|
return [super init];
|
|
|
|
}
|
|
|
|
|
2004-11-02 05:12:00 +00:00
|
|
|
+ (void) initialize
|
|
|
|
{
|
|
|
|
print ("+initialize\n");
|
|
|
|
}
|
|
|
|
|
2002-05-31 06:02:26 +00:00
|
|
|
-run
|
|
|
|
{
|
|
|
|
print ("Hello world\n");
|
2004-11-02 07:13:00 +00:00
|
|
|
printf ("%i %p\n", self, &self.x);
|
2011-02-10 05:47:24 +00:00
|
|
|
return self;
|
2002-05-31 06:02:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|