Cannot place methods in tableView: cellForRowAtIndexPath?

Show us some code snippets. One that creates/instantiates "alphabets" and one where it's used EDIT: Based on the code snippets you've added in your question, it looks to me like you probably need: alphabets retain after your last assignment to "alphabets" -- I can't say for sure without seeing the implementation of "myLogic makeAscending: alphabets" -- if it calls a method that returns a temporary string, though, you'll need to retain it to keep it in a member variable (ivar) Of course, since you need to retain it to access it throughout your own object's lifetime, you'll also have to release it appropriately in your implementation of dealloc.

Show us some code snippets. One that creates/instantiates "alphabets" and one where it's used... EDIT: Based on the code snippets you've added in your question, it looks to me like you probably need: alphabets retain; after your last assignment to "alphabets" -- I can't say for sure without seeing the implementation of "myLogic makeAscending: alphabets" -- if it calls a method that returns a temporary string, though, you'll need to retain it to keep it in a member variable (ivar). Of course, since you need to retain it to access it throughout your own object's lifetime, you'll also have to release it appropriately in your implementation of dealloc.

What is your source of information about garbage collection on the iPhone...? – DLRdave Apr 6 at 19:12 1 developer.apple. Com/library/mac/#documentation/Cocoa/Conceptual/… – Rob Napier Apr 6 at 19:16 Hmm.Interesting. I guess I should have said "released / deleted already" instead of "garbage collected" -- in my mind, they are conceptually quite close to each other.

Thanks for correcting me. – DLRdave Apr 6 at 20:01 oh yea thanks you were absolutely right. I was looking all over the place.

I thought I needed to understand the iphone framework or something. But no I made a beginners mistake. I guess its not too bad considering I am a beginner.

Thanks again. – tyro Apr 6 at 4:30.

The reason your app is crashing is probably because you are calling reloadData inside of cellForRowAtIndexPath. ReloadData will cause cellForRowAtIndexPath to fire again, and you're stuck in an infinite loop until you run out of memory. Try setting a breakpoint in your cellForRowAtIndexPath, and watch it happen.

No I don't have reloaddata in cellForRowAtIndexPath – tyro Apr 5 at 21:17.

I would do something like if (alphabets) { cell.textLabel. Text = alphabets; } because from your sample code it seems you might be assigning textLabel. Text from an uninitialized pointer until someone edits textField.

I'm trying to write an app that will have a custom tableviewcell so I followed the apple developer sample code, but when I run my app, the screen is completely white. When I put breakpoints/NSLogs in the numberOfSectionsInTableView, numberOfRowsInSection, or the cellForRowAtIndexPath, nothing shows. Here is my delegate.

And this is the cellForRowAtIndexPath in my RootViewController. I know that the cellForRowAtIndexPath won't show if there are no rows, but shouldn't the numberOfRowsInSection at least work?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions