home *** CD-ROM | disk | FTP | other *** search
-
- /* Generated by Interface Builder */
-
- #import "MyObject.h"
- #import <appkit/nextstd.h>
- #import <appkit/Form.h>
- #import <appkit/Application.h>
-
- @implementation MyObject
-
- void update (teNum, now, myself)
- DPSTimedEntry teNum;
- double now;
- id myself;
- {
- [myself doTimedEntry];
- }
-
- - setForm:anObject
- {
- form = anObject;
- return self;
- }
-
- - startTimedEntry:sender
- {
- clockTE = DPSAddTimedEntry(0.1, &update, self, NX_MODALRESPTHRESHOLD);
- return self;
- }
-
- - stopTimedEntry:sender
- {
- DPSRemoveTimedEntry (clockTE);
- return self;
- }
-
- - doTimedEntry
- {
- static float localCounter;
- localCounter += 0.1;
- [form setFloatValue:localCounter];
- }
-
- // Good programming practice. Free what you create!
- - free
- {
- [self stopTimedEntry:self];
- return [super free];
- }
-
- @end
-