Created
March 31, 2011 14:35
-
-
Save orlaqp/896456 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import <AppKit/CPButton.j> | |
@implementation AnchorLink : CPButton | |
{ | |
} | |
- (void)setObjectvalue:(id)anObjectValue | |
{ | |
debugger; | |
if (!anObjectValue || anObjectValue === @"") | |
{ | |
[self setTitle:@"N/A"]; | |
} | |
else | |
{ | |
[self setTitle:[anObjectValue stringValue]]; | |
} | |
[super setObjectValue:anObjectValue]; | |
} | |
@end | |
-- Table Code, here is where I add the column | |
var linkButton = [[AnchorLink alloc] initWithFrame:CGRectMake(0,0,100,28)]; | |
[linkButton setBordered:NO]; | |
[linkButton setTextColor:[CPColor blueColor]]; | |
[linkButton setTitle:@"Open report in new page"]; | |
var linkColumn = [[CPTableColumn alloc] initWithIdentifier:@"links"]; | |
[[linkColumn headerView] setStringValue:"Link"]; | |
[linkColumn setMaxWidth:500.0]; | |
[linkColumn setWidth:200.0]; | |
[linkColumn setDataView:linkButton]; | |
[_tableView addTableColumn:linkColumn]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment