Why am I getting an isEqualToString error in this Cocoa code?

后端 未结 5 1318
南笙
南笙 2021-01-28 13:02

I keep getting this error:

alt text http://img514.imageshack.us/img514/2203/help.tif

What is it? I never even called \"isEqualToString\".

Here Is my Joke

5条回答
  •  一整个雨季
    2021-01-28 14:05

    Replace this line:

    cell.text = [jokes objectAtIndex:indexPath.row];
    

    with these lines:

    Joke *j = (Joke *)[jokes objectAtIndex:indexPath.row];
    if( j )
      cell.text = j.joke;
    

提交回复
热议问题