Skip to content

Commit f0c56cb

Browse files
author
Christian Kienle
committed
generics
1 parent 3dd2019 commit f0c56cb

30 files changed

+294
-409
lines changed

CDEKit/CDEKit/NSEntityDescription+CDEAdditions.h

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,15 @@
33
@interface NSEntityDescription (CDEAdditions)
44

55
#pragma mark - Convenience
6-
- (NSArray *)supportedAttributes_cde;
7-
- (NSArray *)toManyRelationships_cde;
8-
- (NSDictionary *)toManyRelationshipsByName_cde;
9-
- (NSArray *)sortedToManyRelationshipNames_cde;
10-
- (NSArray *)sortedToManyRelationships_cde;
11-
- (NSArray *)sortedToOneRelationships_cde;
12-
- (NSArray *)sortedRelationships_cde;
13-
//@property (nonatomic, readonly) NSString *nameForDisplay_cde;
6+
- (NSArray<NSAttributeDescription*> *)supportedAttributes_cde;
7+
- (NSArray<NSRelationshipDescription*> *)toManyRelationships_cde;
8+
- (NSDictionary<NSString*, NSRelationshopDescription*>*)toManyRelationshipsByName_cde;
9+
- (NSArray<NSString*> *)sortedToManyRelationshipNames_cde;
10+
- (NSArray<NSRelationshipDescription*> *)sortedToManyRelationships_cde;
11+
- (NSArray<NSRelationshipDescription*> *)sortedToOneRelationships_cde;
12+
- (NSArray<NSRelationshipDescription*> *)sortedRelationships_cde;
1413
- (NSAttributeDescription *)attributeDescriptionForName_cde:(NSString *)attributeName;
1514

16-
#pragma mark - CSV
17-
//// returns an array of arrays
18-
//- (NSArray *)CSVValuesForEachManagedObjectInArray_cde:(NSArray *)objects;
19-
//
20-
//// This method filters out any non supported property names and also respects the sorting of propertyNames
21-
//- (NSArray *)CSVValuesForEachManagedObjectInArray:(NSArray *)objects forPropertyNames:(NSArray *)propertyNames includeHeaderValues_cde:(BOOL)includeHeaderValues;
22-
//- (NSArray *)supportedCSVAttributes_cde;
23-
2415
#pragma mark - UI
2516
- (UIImage *)icon_cde;
2617

CDEKit/CDEKit/NSEntityDescription+CDEAdditions.m

Lines changed: 64 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -4,151 +4,91 @@
44
@implementation NSEntityDescription (CDEAdditions)
55

66
#pragma mark - Convenience
7-
- (NSArray *)supportedAttributes_cde {
8-
NSMutableArray *result = [NSMutableArray new];
9-
for(NSAttributeDescription *attribute in [[self attributesByName] allValues]) {
10-
// Ignore transient properties
11-
if(attribute.isTransient) {
12-
continue;
13-
}
14-
if(!attribute.isSupportedAttribute_cde) {
15-
continue;
16-
}
17-
18-
[result addObject:attribute];
7+
- (NSArray<NSAttributeDescription*> *)supportedAttributes_cde {
8+
NSMutableArray *result = [NSMutableArray new];
9+
for(NSAttributeDescription *attribute in [[self attributesByName] allValues]) {
10+
// Ignore transient properties
11+
if(attribute.isTransient) {
12+
continue;
1913
}
20-
return result;
14+
if(!attribute.isSupportedAttribute_cde) {
15+
continue;
16+
}
17+
18+
[result addObject:attribute];
19+
}
20+
return result;
2121
}
2222

23-
- (NSArray *)toManyRelationships_cde {
24-
NSMutableArray *result = [NSMutableArray new];
25-
[self.relationshipsByName enumerateKeysAndObjectsUsingBlock:^(id key, NSRelationshipDescription *relation, BOOL *stop) {
26-
if(relation.isToMany == NO) {
27-
return;
28-
}
29-
[result addObject:relation];
30-
}];
31-
return result;
23+
- (NSArray<NSRelationshipDescription*> *)toManyRelationships_cde {
24+
NSMutableArray *result = [NSMutableArray new];
25+
[self.relationshipsByName enumerateKeysAndObjectsUsingBlock:^(id key, NSRelationshipDescription *relation, BOOL *stop) {
26+
if(relation.isToMany == NO) {
27+
return;
28+
}
29+
[result addObject:relation];
30+
}];
31+
return result;
3232
}
3333

34-
- (NSDictionary *)toManyRelationshipsByName_cde {
35-
NSMutableDictionary *result = [NSMutableDictionary new];
36-
[self.relationshipsByName enumerateKeysAndObjectsUsingBlock:^(NSString *name, NSRelationshipDescription *relation, BOOL *stop) {
37-
if(relation.isToMany == NO) {
38-
return;
39-
}
40-
result[name] = relation;
41-
}];
42-
return result;
34+
- (NSDictionary<NSString*, NSRelationshopDescription*> *)toManyRelationshipsByName_cde {
35+
NSMutableDictionary *result = [NSMutableDictionary new];
36+
[self.relationshipsByName enumerateKeysAndObjectsUsingBlock:^(NSString *name, NSRelationshipDescription *relation, BOOL *stop) {
37+
if(relation.isToMany == NO) {
38+
return;
39+
}
40+
result[name] = relation;
41+
}];
42+
return result;
4343
}
4444

45-
- (NSArray *)sortedToManyRelationshipNames_cde {
46-
NSArray *unsorted = [[self toManyRelationshipsByName_cde] allKeys];
47-
return [unsorted sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(NSString *relationA, NSString *relationB) {
48-
return [relationA localizedStandardCompare:relationB];
49-
}];
45+
- (NSArray<NSString*> *)sortedToManyRelationshipNames_cde {
46+
NSArray *unsorted = [[self toManyRelationshipsByName_cde] allKeys];
47+
return [unsorted sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(NSString *relationA, NSString *relationB) {
48+
return [relationA localizedStandardCompare:relationB];
49+
}];
5050
}
5151

52-
- (NSArray *)sortedToManyRelationships_cde {
53-
NSMutableArray *result = [NSMutableArray new];
54-
[self.relationshipsByName enumerateKeysAndObjectsUsingBlock:^(id key, NSRelationshipDescription *relation, BOOL *stop) {
55-
if(relation.isToMany == NO) {
56-
return;
57-
}
58-
[result addObject:relation];
59-
}];
60-
return [result sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(NSRelationshipDescription *relationA, NSRelationshipDescription *relationB) {
61-
return [relationA.name localizedStandardCompare:relationB.name];
62-
}];
52+
- (NSArray<NSRelationshipDescription*> *)sortedToManyRelationships_cde {
53+
NSMutableArray *result = [NSMutableArray new];
54+
[self.relationshipsByName enumerateKeysAndObjectsUsingBlock:^(id key, NSRelationshipDescription *relation, BOOL *stop) {
55+
if(relation.isToMany == NO) {
56+
return;
57+
}
58+
[result addObject:relation];
59+
}];
60+
return [result sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(NSRelationshipDescription *relationA, NSRelationshipDescription *relationB) {
61+
return [relationA.name localizedStandardCompare:relationB.name];
62+
}];
6363
}
6464

65-
- (NSArray *)sortedToOneRelationships_cde {
66-
NSMutableArray *result = [NSMutableArray new];
67-
[self.relationshipsByName enumerateKeysAndObjectsUsingBlock:^(id key, NSRelationshipDescription *relation, BOOL *stop) {
68-
if(relation.isToMany) {
69-
return;
70-
}
71-
[result addObject:relation];
72-
}];
73-
return [result sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(NSRelationshipDescription *relationA, NSRelationshipDescription *relationB) {
74-
return [relationA.name localizedStandardCompare:relationB.name];
75-
}];
65+
- (NSArray<NSRelationshipDescription*> *)sortedToOneRelationships_cde {
66+
NSMutableArray *result = [NSMutableArray new];
67+
[self.relationshipsByName enumerateKeysAndObjectsUsingBlock:^(id key, NSRelationshipDescription *relation, BOOL *stop) {
68+
if(relation.isToMany) {
69+
return;
70+
}
71+
[result addObject:relation];
72+
}];
73+
return [result sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(NSRelationshipDescription *relationA, NSRelationshipDescription *relationB) {
74+
return [relationA.name localizedStandardCompare:relationB.name];
75+
}];
7676
}
7777

78-
- (NSArray *)sortedRelationships_cde {
79-
return [self.relationshipsByName.allValues sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(NSRelationshipDescription *relationA, NSRelationshipDescription *relationB) {
80-
return [relationA.name localizedStandardCompare:relationB.name];
81-
}];
78+
- (NSArray<NSRelationshipDescription*> *)sortedRelationships_cde {
79+
return [self.relationshipsByName.allValues sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(NSRelationshipDescription *relationA, NSRelationshipDescription *relationB) {
80+
return [relationA.name localizedStandardCompare:relationB.name];
81+
}];
8282
}
8383

84-
//- (NSString *)nameForDisplay_cde {
85-
// return [self.name humanReadableStringAccordingToUserDefaults_cde];
86-
//}
87-
8884
- (NSAttributeDescription *)attributeDescriptionForName_cde:(NSString *)attributeName {
89-
NSParameterAssert(attributeName);
90-
return self.attributesByName[attributeName];
85+
NSParameterAssert(attributeName);
86+
return self.attributesByName[attributeName];
9187
}
9288

93-
//#pragma mark - CSV
94-
//// returns an array of arrays
95-
//- (NSArray *)CSVValuesForEachManagedObjectInArray_cde:(NSArray *)objects {
96-
// NSParameterAssert(objects);
97-
// NSArray *supportedAttributes = self.supportedCSVAttributes_cde;
98-
// NSArray *supportedAttributeNames = [supportedAttributes valueForKey:@"name"];
99-
// return [self CSVValuesForEachManagedObjectInArray:objects forPropertyNames:supportedAttributeNames includeHeaderValues_cde:NO];
100-
//}
101-
//
102-
//// This method filters out any non supported property names and also respects the sorting of propertyNames
103-
//- (NSArray *)CSVValuesForEachManagedObjectInArray:(NSArray *)objects forPropertyNames:(NSArray *)propertyNames includeHeaderValues_cde:(BOOL)includeHeaderValues {
104-
// NSParameterAssert(objects);
105-
// NSParameterAssert(propertyNames);
106-
//
107-
// NSMutableArray *supportedAttributeNames = [NSMutableArray new];
108-
// for(NSString *propertyName in propertyNames) {
109-
// if([propertyName isEqualToString:@"objectID"]) {
110-
// [supportedAttributeNames addObject:propertyName];
111-
// continue;
112-
// }
113-
// NSAttributeDescription *attribute = self.attributesByName[propertyName];
114-
// if(attribute == nil) {
115-
// continue;
116-
// }
117-
// if(!attribute.isSupportedAttribute_cde || !attribute.isSupportedCSVAttribute_cde) {
118-
// continue;
119-
// }
120-
// [supportedAttributeNames addObject:attribute.name];
121-
// }
122-
//
123-
// NSMutableArray *result = [NSMutableArray arrayWithCapacity:objects.count + 1];
124-
//
125-
// if(includeHeaderValues) {
126-
// [result addObject:supportedAttributeNames];
127-
// }
128-
//
129-
// for(NSManagedObject *object in objects) {
130-
// NSAssert([object.entity isKindOfEntity:self], @"Entity mismatch");
131-
// NSArray *values = [object CSVValuesForAttributeNames_cde:supportedAttributeNames];
132-
// [result addObject:values];
133-
// }
134-
//
135-
// return result;
136-
//}
137-
//
138-
//- (NSArray *)supportedCSVAttributes_cde {
139-
// NSMutableArray *result = [NSMutableArray new];
140-
// for(NSAttributeDescription *attribute in self.supportedAttributes_cde) {
141-
// if(attribute.isSupportedCSVAttribute_cde) {
142-
// [result addObject:attribute];
143-
// }
144-
// }
145-
// return result;
146-
//}
147-
14889
#pragma mark - UI
14990
- (UIImage *)icon_cde {
15091
return nil;
151-
// return [UIImage imageNamed:@"entity-icon-small"];
15292
}
15393

15494
@end

Core Data Editor/Core Data Editor.xcodeproj/project.pbxproj

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
AB5583A5176751AE005C002C /* icon.iconset in Resources */ = {isa = PBXBuildFile; fileRef = AB5583A4176751AE005C002C /* icon.iconset */; };
7272
AB59DA401DDF42AA00A19963 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AB59DA3F1DDF42AA00A19963 /* Main.storyboard */; };
7373
AB59DA601DDF43FE00A19963 /* PreferencesWC.m in Sources */ = {isa = PBXBuildFile; fileRef = AB59DA5F1DDF43FE00A19963 /* PreferencesWC.m */; };
74-
AB7F20CE19DD7B4D00EBBF52 /* VibrantView.m in Sources */ = {isa = PBXBuildFile; fileRef = AB7F20CD19DD7B4D00EBBF52 /* VibrantView.m */; };
7574
AB86F7CB1791922600FB0AEB /* CDEAttributeEditorWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = AB86F7C91791922600FB0AEB /* CDEAttributeEditorWindowController.m */; };
7675
AB86F7CC1791922600FB0AEB /* CDEAttributeEditorWindowController.xib in Resources */ = {isa = PBXBuildFile; fileRef = AB86F7CA1791922600FB0AEB /* CDEAttributeEditorWindowController.xib */; };
7776
AB8F8342177C524B000B4467 /* CDEUnorderedRelationshipRequestDataCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = AB8F8341177C524B000B4467 /* CDEUnorderedRelationshipRequestDataCoordinator.m */; };
@@ -343,8 +342,6 @@
343342
AB59DA3F1DDF42AA00A19963 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
344343
AB59DA5E1DDF43FE00A19963 /* PreferencesWC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreferencesWC.h; sourceTree = "<group>"; };
345344
AB59DA5F1DDF43FE00A19963 /* PreferencesWC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PreferencesWC.m; sourceTree = "<group>"; };
346-
AB7F20CC19DD7B4D00EBBF52 /* VibrantView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VibrantView.h; sourceTree = "<group>"; };
347-
AB7F20CD19DD7B4D00EBBF52 /* VibrantView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VibrantView.m; sourceTree = "<group>"; };
348345
AB86F7C81791922600FB0AEB /* CDEAttributeEditorWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDEAttributeEditorWindowController.h; sourceTree = "<group>"; };
349346
AB86F7C91791922600FB0AEB /* CDEAttributeEditorWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDEAttributeEditorWindowController.m; sourceTree = "<group>"; };
350347
AB86F7CA1791922600FB0AEB /* CDEAttributeEditorWindowController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CDEAttributeEditorWindowController.xib; sourceTree = "<group>"; };
@@ -752,9 +749,7 @@
752749
AB1466C5178727F600E3EEA3 /* CDEValidationErrorsViewController.h */,
753750
AB1466C6178727F600E3EEA3 /* CDEValidationErrorsViewController.m */,
754751
AB1466C7178727F600E3EEA3 /* CDEValidationErrorsViewController.xib */,
755-
AB1467061789A1BF00E3EEA3 /* Row View (not used) */,
756-
AB7F20CC19DD7B4D00EBBF52 /* VibrantView.h */,
757-
AB7F20CD19DD7B4D00EBBF52 /* VibrantView.m */,
752+
AB1467061789A1BF00E3EEA3 /* Row View */,
758753
);
759754
name = "Validation Errors View Controller";
760755
sourceTree = "<group>";
@@ -768,13 +763,13 @@
768763
name = NSManagedObjectID;
769764
sourceTree = "<group>";
770765
};
771-
AB1467061789A1BF00E3EEA3 /* Row View (not used) */ = {
766+
AB1467061789A1BF00E3EEA3 /* Row View */ = {
772767
isa = PBXGroup;
773768
children = (
774769
AB1466CD1787492400E3EEA3 /* CDETableRowView.h */,
775770
AB1466CE1787492400E3EEA3 /* CDETableRowView.m */,
776771
);
777-
name = "Row View (not used)";
772+
name = "Row View ";
778773
sourceTree = "<group>";
779774
};
780775
AB1467071789B16F00E3EEA3 /* Attribute Editor */ = {
@@ -2373,7 +2368,6 @@
23732368
AB86F7CB1791922600FB0AEB /* CDEAttributeEditorWindowController.m in Sources */,
23742369
ABBB31E217984AC100FE964E /* CDENameToNameForDisplayValueTransformer.m in Sources */,
23752370
ABBB322A1798538100FE964E /* NSError+CDEValidation.m in Sources */,
2376-
AB7F20CE19DD7B4D00EBBF52 /* VibrantView.m in Sources */,
23772371
ABBB322E179855D500FE964E /* NSManagedObject+CDEAdditions.m in Sources */,
23782372
ABBB32321798564100FE964E /* NSManagedObjectContext+CDEAdditions.m in Sources */,
23792373
AB531222179953B300529EF7 /* NSTableColumn+CDERequestDataCoordinator.m in Sources */,

Core Data Editor/Core Data Editor/CDEAboutWindowController.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
//
2-
// CDEAboutWindowController.h
3-
// Core Data Editor
4-
//
5-
// Created by cmk on 8/6/13.
6-
// Copyright (c) 2013 Christian Kienle. All rights reserved.
7-
//
8-
91
#import <Cocoa/Cocoa.h>
102

113
@interface CDEAboutWindowController : NSWindowController

Core Data Editor/Core Data Editor/CDEAboutWindowController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#import "CDEAboutWindowController.h"
22

33
@interface CDEAboutWindowController ()
4+
45
@property (unsafe_unretained) IBOutlet NSTextView *textView;
56

67
@end
78

89
@implementation CDEAboutWindowController
910

10-
- (void)windowDidLoad
11-
{
11+
- (void)windowDidLoad {
1212
[super windowDidLoad];
1313
NSURL *aboutURL = [[NSBundle mainBundle] URLForResource:@"Credits" withExtension:@"rtf"];
1414
NSAttributedString *aboutText = [[NSAttributedString alloc] initWithURL:aboutURL options:@{} documentAttributes:NULL error:NULL];

Core Data Editor/Core Data Editor/CDEAttributeEditor.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ - (void)showEditorForManagedObject:(NSManagedObject *)managedObject
3131
[self.windowController window];
3232

3333
[positioningView.window beginSheet:self.windowController.window completionHandler:^(NSModalResponse returnCode) {
34-
// [sheet orderOut:self];
3534
self.viewController = nil;
3635
self.windowController = nil;
3736
self.completionHandler ? self.completionHandler() : nil;

Core Data Editor/Core Data Editor/CDECSVAccessoryViewController.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ - (instancetype)init {
2020

2121
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
2222
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
23-
if(self) {
24-
25-
}
23+
if(self) { }
2624
return self;
2725
}
2826

Core Data Editor/Core Data Editor/CDECSVDelimiter.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@interface CDECSVDelimiter ()
1010

1111
#pragma mark Getting Delimiter Instances
12-
+ (NSDictionary *)delimiterStringValueForMenuItemTagMapping;
12+
+ (NSDictionary<NSNumber*, NSString*> *)delimiterStringValueForMenuItemTagMapping;
1313

1414
#pragma mark Creating
1515
- (id)initWithStringRepresentation:(NSString *)stringRepresentation_ menuItemTag:(NSInteger)menuItemTag_;
@@ -23,7 +23,7 @@ - (id)initWithStringRepresentation:(NSString *)stringRepresentation_ menuItemTag
2323
@implementation CDECSVDelimiter
2424

2525
#pragma mark Getting Delimiter Instances
26-
+ (NSDictionary *)delimiterStringValueForMenuItemTagMapping {
26+
+ (NSDictionary<NSNumber*, NSString*> *)delimiterStringValueForMenuItemTagMapping {
2727
NSMutableDictionary *result = [NSMutableDictionary dictionary];
2828
result[@(CDECSVDelimiterMenuItemTagComma)] = @",";
2929
result[@(CDECSVDelimiterMenuItemTagSemicolon)] = @";";

Core Data Editor/Core Data Editor/CDECSVImportWindowController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ typedef void(^CDECSVImportWindowControllerCompletionHandler)(CDECSVImportWindowC
1010
@property (nonatomic, copy, readonly) NSArray *entityDescriptions;
1111

1212
#pragma mark Presenting the Window Controller
13-
- (void)beginSheetModalForWindow:(NSWindow *)window entityDescriptions:(NSArray *)entityDescriptions selectedEntityDescription:(NSEntityDescription *)selectedEntityDescription completionHandler:(CDECSVImportWindowControllerCompletionHandler)completionHandler;
13+
- (void)beginSheetModalForWindow:(NSWindow *)window entityDescriptions:(NSArray<NSEntityDescription*> *)entityDescriptions selectedEntityDescription:(NSEntityDescription *)selectedEntityDescription completionHandler:(CDECSVImportWindowControllerCompletionHandler)completionHandler;
1414

1515
@end

Core Data Editor/Core Data Editor/CDECSVImportWindowController.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ - (IBAction)selectedDestinationEntityChanged:(id)sender {
217217
}
218218

219219
#pragma mark Presenting the Window Controller
220-
- (void)beginSheetModalForWindow:(NSWindow *)parentWindow entityDescriptions:(NSArray *)entityDescriptions selectedEntityDescription:(NSEntityDescription *)selectedEntityDescription completionHandler:(CDECSVImportWindowControllerCompletionHandler)completionHandler {
220+
- (void)beginSheetModalForWindow:(NSWindow *)parentWindow entityDescriptions:(NSArray<NSEntityDescription*> *)entityDescriptions selectedEntityDescription:(NSEntityDescription *)selectedEntityDescription completionHandler:(CDECSVImportWindowControllerCompletionHandler)completionHandler {
221221
NSParameterAssert(entityDescriptions);
222222
NSParameterAssert(parentWindow);
223223
self.entityDescriptions = entityDescriptions;
@@ -229,7 +229,6 @@ - (void)beginSheetModalForWindow:(NSWindow *)parentWindow entityDescriptions:(NS
229229
self.completionHandler = completionHandler;
230230
[self window];
231231
// Entities Popup Button: Begin
232-
233232
[self.entitiesPopupButton removeAllItems];
234233

235234
NSMenuItem *selectedItem = nil;
@@ -252,7 +251,6 @@ - (void)beginSheetModalForWindow:(NSWindow *)parentWindow entityDescriptions:(NS
252251
// Entities Popup Button: End
253252
[self updateMappingsArrayController];
254253
[parentWindow beginSheet:self.window completionHandler:^(NSModalResponse returnCode) {
255-
// [sheet orderOut:self];
256254
self.completionHandler ? self.completionHandler([self resultForCurrentConfiguration]) : nil;
257255
self.completionHandler = nil;
258256

0 commit comments

Comments
 (0)