开发者

Returning NSString, Error Message: Variable is not CFString

i shortly started Programming Mac OS X Applications with Cocoa, so its a realy New bee question. Sorry about this.

At first my code snippet:

- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row {
    Purchaser *actPurchaser = [tableViewDataArray objectAtIndex:row];
    NSString *colID = [tableColumn identifier];
    NSString *cell = [actPurchaser performSelector:NSSelectorFromString( colID)];

    return cell;
}

You see i want to display all Members off Purchaser in a NSTableView, but the Program start for a long time and then fails. A look in debugger says that the Problem is the NSString, debugger says "Variable is not CFString". I've no idea whats this should/could mean, so i googled around, found some forum threads, but no one helps me.开发者_运维百科

Any Ideas? If i let out some Informations, sorry. Ask me about them!

Greetings, Dennis


Have you checked that the -identifier method actually returns an NSString instance? Try NSLog(@"colID = %@", colID); I suspect you may not have set the identifier for some column, or that you have set an identifier which isn't a string.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜