Refactor Actions. SubAction is a (mostly) proper JSAction. JSActions have (more)...
[enjoyable.git] / JSAction.m
index a0fab80..6bc1529 100644 (file)
@@ -5,23 +5,31 @@
 //  Created by Sam McCall on 4/05/09.
 //
 
+#import "JSAction.h"
+
 @implementation JSAction
 
-@synthesize usage, cookie, index, subActions, base, name;
+@synthesize cookie;
+@synthesize index;
+@synthesize subActions;
+@synthesize base;
+@synthesize name;
 
--(id) findSubActionForValue: (IOHIDValueRef) value {
-       return NULL;
+- (id)findSubActionForValue:(IOHIDValueRef)value {
+    return NULL;
 }
 
--(NSString*) stringify {
-       return [[NSString alloc] initWithFormat: @"%@~%d",[base stringify],(int)cookie];
+- (NSString *)stringify {
+    return [NSString stringWithFormat: @"%@~%p", [base stringify], cookie];
 }
--(void) notifyEvent: (IOHIDValueRef) value {
-       [self doesNotRecognizeSelector:_cmd];
+
+- (void)notifyEvent:(IOHIDValueRef)value {
+    [self doesNotRecognizeSelector:_cmd];
 }
--(BOOL) active {
-       [self doesNotRecognizeSelector:_cmd];
-       return NO;
+
+- (BOOL)active {
+    [self doesNotRecognizeSelector:_cmd];
+    return NO;
 }
 
 @end