This is TestCounter.h in view mode; [Download] [Up]
/*
* Counter: simple counter object that runs in its own thread.
*/
#import <objc/Object.h>
//#import <machkit/NXLock.h>
#import "CJRLock.h"
@interface Counter : Object
{
// targets
id countField;
id intervalField;
id slider;
id window;
@private
char *title;
int mynum;
int lastcount;
volatile int count;
volatile int interval;
volatile BOOL running;
CJRConditionLock *runlock;
}
// Actions
- start:sender;
// Starts counting (detaches a new thread to count)
- stop:sender;
// Stop (pause) the counter (ends the thread)
- startOrStop:sender;
// Starts or stops the counter depending on the sender's state
// (sender should be a Button)
- reset:sender;
// resets the counter to zero
- setInterval:sender;
// Target for actions that change the count interval
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.