X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=JSAction.m;h=0216e582f1e3729c1a61d8231dc36a7c6eab3a80;hp=8576b2fdc6af36e4a95dfc55db90f762957dc960;hb=44fe6f649589488b367eee7ffff240cecf8669ad;hpb=51d43664909060e85c943c4d63cc3cff307ceb1d diff --git a/JSAction.m b/JSAction.m index 8576b2f..0216e58 100644 --- a/JSAction.m +++ b/JSAction.m @@ -10,18 +10,25 @@ @implementation JSAction @synthesize cookie; -@synthesize index; @synthesize children; @synthesize base; @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 {