home *** CD-ROM | disk | FTP | other *** search
-
- /* Generated by Interface Builder */
-
- #import "MyObject.h"
- #import <stdio.h>
-
- @implementation MyObject
-
- + new // this section of code will get run only once
- {
- self = [super new]; // create new instance of myObject by sending the
- // "new" message to our superclass plus run the
- // following code:
- myInt = 100;
- printf("new myInt = %d\n", myInt);
- return self;
- }
-
- - event1:sender
- {
- myInt++;
- printf("myInt++ = %d\n", myInt);
- return self;
- }
-
- - event2:sender
- {
- myInt--;
- printf("myInt-- = %d\n", myInt);
- return self;
- }
-
-
- @end
-