- (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger) row AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;

Thanks a lot, that seems to work really well. However, because I'm only specifying the cell for one column how do I get out of the method without messing with the other columns. I get the following warning;

- (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger) row
{
        NSCell *cell = [NSCell alloc];
        if ([[tableColumn identifier] isEqualToString:@"budget"]) {
                //Fetch account type
Account *selectedAccount = [[accountsController arrangedObjects] objectAtIndex:row]; if ([[selectedAccount valueForKeyPath:@"type.name"] isEqualToString:@"Assets"] || [[selectedAccount valueForKeyPath:@"type.name"] isEqualToString:@"Liabilities"]){
                        [cell initTextCell:@""];
                        return (cell);
                }
        }
        return;
}
warning: 'return' with no value, in function returning non-void


___

return [tableColumn dataCell];

also note you have a memory leak, you want return [cell autorelease], and probably don't want to alloc the cell until you need it.

--corbin




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to