root/trunk/Views/JVViewCell.m

Revision 3418, 0.7 kB (checked in by timothy, 2 years ago)

Turing on more warnings and fixing more of them.

  • Property svn:executable set to *
Line 
1 // Created by Joar Wingfors.
2 // Modified by Timothy Hatcher for Colloquy.
3 // Copyright Joar Wingfors and Timothy Hatcher. All rights reserved.
4
5 #import "JVViewCell.h"
6
7 @implementation JVViewCell
8 - (void) dealloc {
9         [_view release];
10     _view = nil;
11     [super dealloc];
12 }
13
14 - (void) setView:(NSView *) view {
15         [_view autorelease];
16     _view = [view retain];
17 }
18
19 - (NSView *) view {
20     return _view;
21 }
22
23 - (void) drawWithFrame:(NSRect) cellFrame inView:(NSView *) controlView {
24     [super drawWithFrame:cellFrame inView:controlView];
25
26     [[self view] setFrame:cellFrame];
27
28     if( [[self view] superview] != controlView )
29                 [controlView addSubview:[self view]];
30 }
31 @end
Note: See TracBrowser for help on using the browser.