JSAction base property should be eweak as it creates a circular reference with base...
[enjoyable.git] / SubAction.m
1 //
2 // SubAction.m
3 // Enjoy
4 //
5 // Created by Sam McCall on 5/05/09.
6 //
7
8 // TODO(jfw): This class is useless and can just be replaced w/ JSAction probably.
9
10 #import "SubAction.h"
11
12 @implementation SubAction
13
14 - (id)initWithIndex:(int)newIndex name:(NSString *)newName base:(JSAction *)newBase {
15 if ((self = [super init])) {
16 self.name = newName;
17 self.base = newBase;
18 self.index = newIndex;
19 }
20 return self;
21 }
22
23 -(NSString*) stringify {
24 return [[NSString alloc] initWithFormat: @"%@~%d", [self.base stringify], self.index];
25 }
26
27 @end