File: ErrorController.m

package info (click to toggle)
wcalc 2.4-1.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,916 kB
  • sloc: ansic: 7,089; objc: 2,002; sh: 890; lex: 816; yacc: 641; makefile: 103
file content (30 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "ErrorController.h"
#ifdef MEMWATCH
#include "memwatch.h"
#endif

@implementation ErrorController

- (IBAction)closeAlert:(id)sender
{
	[errorMessage setString:@""];
	[errorDialog close];
}

- (IBAction)showAlert:(id)sender
{
	[errorDialog makeKeyAndOrderFront:self];
	[errorDialog center];
}

- (IBAction)throwAlert:(NSString *)message
{
	[errorDialog makeKeyAndOrderFront:self];
	[errorDialog center];
	[errorMessage setEditable:true];
	[errorMessage insertText:message];
	[errorMessage insertText:@"\n"];
	[errorMessage setEditable:false];
	NSBeep();
}
@end