X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=JSAction.m;h=f96c10d878adc5dd7a9c6c2ddb73c385d36da911;hp=8576b2fdc6af36e4a95dfc55db90f762957dc960;hb=3f6df7a954fb74bcebf6fc6c0e60821843b0f31b;hpb=3a40cba25b9bb38887fe4809277d4c0f73462d12 diff --git a/JSAction.m b/JSAction.m index 8576b2f..f96c10d 100644 --- a/JSAction.m +++ b/JSAction.m @@ -16,12 +16,23 @@ @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]; + if (cookie) + return [NSString stringWithFormat: @"%@~%p", [base stringify], cookie]; + else + return [NSString stringWithFormat: @"%@~%@", [base stringify], name]; } - (void)notifyEvent:(IOHIDValueRef)value {