iphone - Table View Crashing When Accessing Array of Dicitonarys -


all,

when table view loads, accesses several delegate methods. when configure cell, have calling method (where "linkedlist" array of dictionarys):

- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath {     static nsstring *cellidentifier = @"cell";      uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier];     if (cell == nil) {         cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:cellidentifier];     }      // configure cell...     vuwimanager *vuwimanager = [vuwimanager sharedvuwimanager];     nslog(@"%@", [[vuwimanager linkedlist]objectatindex:indexpath.row]);     nslog(@"testzomgofdsojfdsjfpodjsapfds");     cell.textlabel.text = [[vuwimanager linkedlist]objectatindex:indexpath.row];     return cell; } 

it crashes @ line cell.textlabel.text = [[vuwimanager linkedlist]objectatindex:indexpath.row]; - know i'm doing wrong here i'm not sure is. again, linkedlist nsmutablearray of nsdictionarys.

edit: if call cell.textlabel.text = [[vuwimanager linkedlist]objectatindex:indexpath.row]; returns: { ip = "192.168.17.1"; desc = "description"; } in debugger. thought i'd give little bit of formatting details.

thanks

you trying assign object nsdictionary cell.textlabel.text, must passed nsstring.

did want :

nsstring *s = [nsstring stringwithformat:@"%@",                         [[vuwimanager linkedlist]objectatindex:indexpath.row]]; cell.textlabel.text = s; 

?


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -