Home | History | Annotate | Download | only in objc-checker
      1 #import <Foundation/Foundation.h>
      2 
      3 @interface Simple : NSObject
      4 {
      5   int _value;
      6 }
      7 - (int) value;
      8 - (void) setValue: (int) newValue;
      9 @end
     10 
     11 @implementation Simple
     12 - (int) value
     13 {
     14   return _value;
     15 }
     16 
     17 - (void) setValue: (int) newValue
     18 {
     19   _value = newValue;
     20 }
     21 @end
     22 
     23 int main ()
     24 {
     25   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
     26   Simple *my_simple = [[Simple alloc] init];
     27   my_simple.value = 20;
     28   // Set a breakpoint here.
     29   NSLog (@"Object has value: %d.", my_simple.value); 
     30   [pool drain];
     31   return 0;
     32 }
     33