X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=JSAction.m;h=0cb98554bf020ba58c622924533e9da9ebadf23e;hp=8576b2fdc6af36e4a95dfc55db90f762957dc960;hb=25dd74a4a34f4ba7ec797360bd8f92cbd7bc758e;hpb=51d43664909060e85c943c4d63cc3cff307ceb1d diff --git a/JSAction.m b/JSAction.m index 8576b2f..0cb9855 100644 --- a/JSAction.m +++ b/JSAction.m @@ -16,12 +16,20 @@ @synthesize name; @synthesize active; +- (id)initWithName:(NSString *)newName base:(JSAction *)newBase { + if ((self = [super init])) { + self.name = newName; + self.base = newBase; + } + return self; +} + - (id)findSubActionForValue:(IOHIDValueRef)value { return NULL; } -- (NSString *)stringify { - return [NSString stringWithFormat: @"%@~%p", [base stringify], cookie]; +- (NSString *)uid { + return [NSString stringWithFormat:@"%@~%@", [self.base uid], self.name]; } - (void)notifyEvent:(IOHIDValueRef)value {