X-Git-Url: https://git.yukkurigames.com/?a=blobdiff_plain;f=JSAction.m;h=0cb98554bf020ba58c622924533e9da9ebadf23e;hb=ada313d7e31dd509c8c7be01f364c9a2ad9860d4;hp=8576b2fdc6af36e4a95dfc55db90f762957dc960;hpb=51d43664909060e85c943c4d63cc3cff307ceb1d;p=enjoyable.git 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 {