PDA

View Full Version : mutableArray contents gets corrupted in "cellForRowAtIndexPath" func of UITableView




pravara15
Nov 17, 2009, 05:56 AM
Hi there,

i have one Mutable array which contains objects of a class. When first time, view get loaded, data is displayed properly in table view.

after that, when i tried to change the contents based on the value in picker control, the contents of mutable array shows, "Invalid".

in the function "numberOfRowsInSection" of tableView, the contents of Mutable array are proper (what i want to display)

but after that as soon as control goes to "cellForRowAtIndexPath" function, contents gets corrupted.

Please let me know, how these two functions work?:confused:

Thanx in advance.:)


I have attached the code files, please find them.



robbieduncan
Nov 17, 2009, 07:18 AM
Post all the code. Without it we cannot help.

PhoneyDeveloper
Nov 17, 2009, 08:15 AM
The usual cause of this is mistakes in memory management. If the array isn't retained correctly by the view controller then it won't be available in cellForRowAtIndexPath. How are you creating the array?