File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,16 @@ - (void) readBlock:(NSFileHandle *) aseFileHandle {
85
85
color = [NSColor colorWithWhite: grey alpha: 1.0 ];
86
86
}
87
87
UInt16 type = [[aseFileHandle readDataOfLength: 2 ] bigEndianUInt16 ];
88
+ if (name == nil || [name isEqualToString: @" \0 " ]) {
89
+ NSColor *convertedColor=[color colorUsingColorSpaceName: NSCalibratedRGBColorSpace ];
90
+
91
+ NSString * hexString = [NSString stringWithFormat: @" #%02X%02X%02X " ,
92
+ (int ) (convertedColor.redComponent * 0xFF ), (int ) (convertedColor.greenComponent * 0xFF ),
93
+ (int ) (convertedColor.blueComponent * 0xFF )];
94
+ name = hexString;
95
+ }
96
+
97
+
88
98
self.colorNames = [self .colorNames arrayByAddingObject: name];
89
99
self.colorList = [self .colorList arrayByAddingObject: color];
90
100
if (self.colors )
@@ -99,4 +109,12 @@ - (void) readBlock:(NSFileHandle *) aseFileHandle {
99
109
- (BOOL ) writeToFile : (NSString *)path {
100
110
return NO ;
101
111
}
112
+
113
+ - (void )finalize {
114
+ self.colors = nil ;
115
+ self.colorNames = nil ;
116
+ self.colorGroups = nil ;
117
+ self.colorList = nil ;
118
+ [super finalize ];
119
+ }
102
120
@end
Original file line number Diff line number Diff line change @@ -13,7 +13,5 @@ @implementation RPCAppDelegate
13
13
- (void )applicationDidFinishLaunching : (NSNotification *)aNotification
14
14
{
15
15
// Insert code here to initialize your application
16
- self.window = self;
17
16
}
18
-
19
17
@end
You can’t perform that action at this time.
0 commit comments