}
// Make the buttons, set the titles, and size them to fit their titles
- okButton = [[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)];
- cancelButton = [[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)];
+ okButton = [[[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)] autorelease];
+ cancelButton = [[[ITButton alloc] initWithFrame:NSMakeRect(0, 0, 300, 24)] autorelease];
[okButton setTarget:target];
[cancelButton setTarget:target];
[okButton setAction:okAction];
wideButtonW,
24.0)];
[[self contentView] addSubview:okButton];
- [[self contentView] addSubview:cancelButton];
+ if (alternateTitle) {
+ [[self contentView] addSubview:cancelButton];
+ }
[self setIgnoresMouseEvents:NO];