- (void) awakeFromNib
{
- [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(updatePiecesView) name: @"UpdatePiecesView" object: nil];
-
[fTransferSectionLabel sizeToFit];
[fDatesSectionLabel sizeToFit];
[fTimeSectionLabel sizeToFit];
frame.size.width -= widthIncrease;
[field setFrame: frame];
}
+
+ //set the click action of the pieces view
+ [fPiecesView setAction:@selector(updatePiecesView)];
+ [fPiecesView setTarget:self];
}
- (void) dealloc
const BOOL availability = ![[NSUserDefaults standardUserDefaults] boolForKey: @"PiecesViewShowAvailability"];
[[NSUserDefaults standardUserDefaults] setBool: availability forKey: @"PiecesViewShowAvailability"];
- [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdatePiecesView" object: self];
+ [self sendAction:[self action] to:[self target]];
}
[super mouseDown: event];