File tree 3 files changed +19
-6
lines changed
3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 8
8
SSYAlertIconInformational /* !< Alert will have "informational" (yellow) icon */
9
9
} ;
10
10
11
+ enum SSYAlertMode_enum {
12
+ SSYAlertModeNonBlocking,
13
+ SSYAlertModeModalSession,
14
+ SSYAlertModeModalDialog
15
+ };
16
+ typedef enum SSYAlertMode_enum SSYAlertMode ;
17
+
11
18
/* !
12
19
@brief This is an addition to Apple's anonymous enumeration containing
13
20
NSAlertDefaultReturn, NSAlertAlternateReturn, NSAlertOtherReturn and NSAlertErrorReturn.
Original file line number Diff line number Diff line change 1
1
#import < Cocoa/Cocoa.h>
2
2
3
- @class SSYAlert ;
3
+ # import " SSYAlert.h "
4
4
5
5
@interface SSYListPicker : NSObject {
6
6
SSYAlert* m_alert ;
67
67
initialPicks : (NSIndexSet *)initialPicks
68
68
windowTitle : (NSString *)windowTitle
69
69
alert : (SSYAlert*)alert
70
- runModal : ( BOOL ) runModal
70
+ mode : (SSYAlertMode) mode
71
71
didEndTarget : (id )didEndTarget
72
72
didEndSelector : (SEL )didEndSelector
73
73
didEndUserInfo : (id )didEndUserInfo
Original file line number Diff line number Diff line change 1
1
#import " SSYListPicker.h"
2
- #import " SSYAlert.h"
3
2
#import " SSYLabelledList.h"
4
3
#import " NSString+LocalizeSSY.h"
5
4
#import " NS(Attributed)String+Geometrics.h"
@@ -40,7 +39,7 @@ - (void)userPickFromList:(NSArray*)displayNames
40
39
initialPicks : (NSIndexSet *)initialPicks
41
40
windowTitle : (NSString *)windowTitle
42
41
alert : (SSYAlert*)alert
43
- runModal : ( BOOL ) runModal
42
+ mode : (SSYAlertMode) mode
44
43
didEndTarget : (id )didEndTarget
45
44
didEndSelector : (SEL )didEndSelector
46
45
didEndUserInfo : (id )didEndUserInfo
@@ -109,8 +108,15 @@ - (void)userPickFromList:(NSArray*)displayNames
109
108
forKey: constKeyDidCancelInvocation] ;
110
109
[alert setClickObject: didEndInfo] ;
111
110
[alert display ] ;
112
- if (runModal) {
113
- [alert runModalSession ] ;
111
+ switch (mode) {
112
+ case SSYAlertModeNonBlocking:
113
+ break ;
114
+ case SSYAlertModeModalSession:
115
+ [alert runModalSession ] ;
116
+ break ;
117
+ case SSYAlertModeModalDialog:
118
+ [alert runModalDialog ] ;
119
+ break ;
114
120
}
115
121
}
116
122
You can’t perform that action at this time.
0 commit comments