All pastes #898132 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-02-10 02:46 UTC
rendered paste body
- (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
{
	NSCell * myCell = [tableColumn dataCellForRow:[outlineView rowForItem:item]];
	
	[myCell setAllowsEditingTextAttributes: YES];
    [myCell setSelectable: YES];
	NSURL* theURL = [NSURL URLWithString:@"http://www.google.com"];
	NSMutableAttributedString * attr = [NSMutableAttributedString hyperlinkFromString:[myCell stringValue] withURL:theURL];
	[myCell setAttributedStringValue:attr];
	[outlineView setTarget:self];
	[outlineView sendActionOn:NSLeftMouseDownMask];
	[outlineView setAction:@selector(cellClicked:)];

	NSLog(@"%u", [myCell type]);
	//return [tableColumn dataCellForRow:[tree1 rowForItem:item]];
}