|
2 | 2 |
|
3 | 3 | @interface SSYPopUpTableHeaderCell ()
|
4 | 4 |
|
5 |
| -@property (retain) SSYPopUpTableHeaderCell* realSelf ; |
6 | 5 | @property CGFloat lostWidth ;
|
| 6 | + |
7 | 7 | @end
|
8 | 8 |
|
9 | 9 |
|
10 | 10 | @implementation SSYPopUpTableHeaderCell
|
11 | 11 |
|
12 |
| -@synthesize realSelf ; |
13 | 12 | @synthesize lostWidth ;
|
14 | 13 |
|
| 14 | +- (id)copyWithZone:(NSZone *)zone { |
| 15 | + SSYPopUpTableHeaderCell* copy = [[SSYPopUpTableHeaderCell allocWithZone: zone] init] ; |
| 16 | + [copy setLostWidth:[self lostWidth]] ; |
| 17 | + |
| 18 | + return copy ; |
| 19 | +} |
| 20 | + |
15 | 21 | - (id)init {
|
16 |
| -#if LOG_UNREAL_SSY_POP_UP_TABLE_HEADER_CELLS |
17 |
| - BOOL didReinitialize = NO ; |
18 |
| - if (realSelf) { |
19 |
| - NSLog(@"Internal Error 340-8282 Re-initializing? oldSelf = %p realSelf = %p", self, realSelf) ;\ |
20 |
| - didReinitialize = YES ; |
21 |
| - } |
22 |
| -#endif |
23 | 22 | if (self = [super init]) {
|
24 |
| - |
25 |
| -#if LOG_UNREAL_SSY_POP_UP_TABLE_HEADER_CELLS |
26 |
| - if (didReinitialize) { |
27 |
| - NSLog(@"Internal Error 340-8257 Re-initializing? newSelf = %p realSelf = %p", self, realSelf) ;\ |
28 |
| - } |
29 |
| -#endif |
30 | 23 | // Set up the popup cell attributes
|
31 | 24 | [self setControlSize:NSMiniControlSize] ;
|
32 | 25 | [self setBordered:NO] ;
|
33 | 26 | [self setBezeled:NO] ;
|
34 | 27 | [self setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]] ;
|
35 |
| - |
36 |
| - // Our mysterious bug catcher |
37 |
| - [self setRealSelf:self] ; |
38 | 28 | }
|
39 | 29 |
|
40 | 30 | return self ;
|
41 | 31 | }
|
42 | 32 |
|
43 |
| -/*- (void)stopTracking:(NSPoint)lastPoint |
44 |
| - at:(NSPoint)stopPoint |
45 |
| - inView:(NSView *)controlView |
46 |
| - mouseIsUp:(BOOL)flag { |
47 |
| -NSLog(@"1068 %s", __PRETTY_FUNCTION__) ; |
48 |
| -} |
49 |
| -*/ |
50 |
| - |
51 |
| -- (void)dealloc { |
52 |
| - if (self != [self realSelf]) { |
53 |
| -#if LOG_UNREAL_SSY_POP_UP_TABLE_HEADER_CELLS |
54 |
| - NSLog(@"Internal Error 340-9281 in %s", __PRETTY_FUNCTION__) ; |
55 |
| -#endif |
56 |
| - return ; |
57 |
| - } |
58 |
| - |
59 |
| - [realSelf release] ; |
60 |
| - [super dealloc] ; |
61 |
| -} |
62 |
| - |
63 | 33 | - (void)drawWithFrame:(NSRect)cellFrame
|
64 | 34 | inView:(NSView*)controlView {
|
65 |
| - if (self != [self realSelf]) { |
66 |
| -#if LOG_UNREAL_SSY_POP_UP_TABLE_HEADER_CELLS |
67 |
| - NSLog(@"Internal Error 300-9481 in %s", __PRETTY_FUNCTION__) ; |
68 |
| - NSLog(@" self: %p %@ %p %p %@", self, NSStringFromSize([self cellSize]), [self itemArray], [self controlView], [[self selectedItem] title]) ; |
69 |
| - NSLog(@" realSelf: %p %@ %p %p %@", realSelf, NSStringFromSize([realSelf cellSize]), [realSelf itemArray], [realSelf controlView], [[self selectedItem] title]) ; |
70 |
| -#endif |
71 |
| - return ; |
72 |
| - } |
73 |
| - |
74 | 35 | // Apple's documentation for this -[NSCell drawWithFrame:inView: states
|
75 | 36 | // "This method draws the cell in the currently focused view,
|
76 | 37 | // which can be different from the controlView passed in. Taking advantage
|
|
0 commit comments