Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (25 sloc) 836 Bytes
// CustomCell.m
// NSTableViewCustomCell
// Created by Tobias Preuss on 04.05.11.
// Copyright 2011 Tobias Preuss. All rights reserved.
#import "CustomCell.h"
#import "DataItem.h"
#import "NSObjectWrapper.h"
@implementation CustomCell
@synthesize view = m_view;
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
if (![m_view superview]) {
[controlView addSubview:m_view];
// The array controller only gets wrapped data items pack by the NSObjectTransformer.
// Therefore, objectValue returns a NSObjectWrapper.
// Unpack the wrapper to retreive the data item.
DataItem* dataItem = [(NSObjectWrapper*)[self objectValue] original];
[[m_view name]];
[[m_view occupation] setStringValue:dataItem.occupation];
[m_view setFrame:cellFrame];
Jump to Line
Something went wrong with that request. Please try again.