--(id)initWithIndex: (int)newIndex andName: (NSString *)newName {
- if(self= [ super init]) {
- subActions = NULL;
- index = newIndex;
- name = [[NSString alloc] initWithFormat: @"Button %d %@", (index+1), newName];
- }
- return self;
+- (id)initWithName:(NSString *)name_ idx:(int)idx max:(int)max_ {
+ if ((self = [super init])) {
+ self.index = idx;
+ self.max = max_;
+ if (name_.length)
+ self.name = [NSString stringWithFormat:@"Button %d - %@", self.index, name_];
+ else
+ self.name = [NSString stringWithFormat:@"Button %d", self.index];
+ }
+ return self;