1 #import <Foundation/Foundation.h>
3 @interface MyClass : NSObject {
7 - (id)initWithMember:(int)_member;
8 - (NSString*)description;
11 @implementation MyClass
13 - (id)initWithMember:(int)_member
15 if (self = [super init])
27 // Set a breakpoint on '-[MyClass description]' and test expressions: expr member
28 - (NSString *)description
30 return [NSString stringWithFormat:@"%d", member];
34 int main (int argc, char const *argv[])
36 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
38 MyClass *my_object = [[MyClass alloc] initWithMember:5];
40 NSLog(@"MyObject %@", [my_object description]);