aboutsummaryrefslogtreecommitdiffstats
path: root/misc/osxfe/ioquake3fe/ErrorWindow.m
blob: 93a8d9198ca090a539e64732f289fa030dea1521 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#import "ErrorWindow.h"

@implementation ErrorWindow

- (void)bitch:(NSString *)errorlog {
	NSLog(errorlog);

	NSNib *nib = [[NSNib alloc] initWithNibNamed:@"ErrorWindow.nib" bundle:[NSBundle mainBundle]];
	[nib instantiateNibWithOwner:self topLevelObjects:nil];
	
	[errorWindow makeKeyWindow];
	[errorTextField setFont:[NSFont userFixedPitchFontOfSize:12.0]];
	[errorTextField setString:@""];
	[[errorTextField textStorage] appendAttributedString:[[[NSAttributedString alloc] initWithString:errorlog] autorelease]];
    [errorTextField scrollRangeToVisible:NSMakeRange([[errorTextField string] length], 0)];
}

@end