0

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

Dennis Stritzke
  • 5,198
  • 1
  • 19
  • 28

1 Answers1

1

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.

Johan Kool
  • 15,637
  • 8
  • 64
  • 81
  • Youre totaly right! My failure is that in Purchaser-Class thereis a Variable of enum-Type. Because of this the Program don't start... Thank your for this adivce ;-) Dennis – Dennis Stritzke Jun 30 '10 at 12:45
  • You're welcome. Also, click the checkmark next to my answer to mark this question as answered, if you feel your problem is solved now. – Johan Kool Jun 30 '10 at 16:16