Commit | Line | Data |
---|---|---|
805e021f CE |
1 | // |
2 | // DialogUtility.m | |
3 | // OpenAFS | |
4 | // | |
5 | // Created by Claudio Bisegni on 01/05/08. | |
6 | // Copyright 2008 Infn. All rights reserved. | |
7 | // | |
8 | ||
9 | #import "DialogUtility.h" | |
10 | ||
11 | ||
12 | @implementation DialogUtility | |
13 | // ------------------------------------------------------------------------------- | |
14 | // showMessage: | |
15 | // ------------------------------------------------------------------------------- | |
16 | + (BOOL) showMessageYesNo:(NSString*) message delegator:(id)delegator functionSelecter:(SEL)fSelector window:(NSWindow*)window { | |
17 | NSAlert *alert = [[[NSAlert alloc] init] autorelease]; | |
18 | [alert setMessageText:message]; | |
19 | [alert addButtonWithTitle:@"Yes"]; | |
20 | [alert addButtonWithTitle:@"No"]; | |
21 | [alert beginSheetModalForWindow:window | |
22 | modalDelegate:delegator | |
23 | didEndSelector:fSelector | |
24 | contextInfo:nil]; | |
25 | return YES; | |
26 | } | |
27 | @end |