Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

HawaiiMacAddict

macrumors 6502a
Original poster
Dec 28, 2006
904
0
On one of my Macs of course
Aloha everyone,

I am currently working on an app that uses a SQLite3 database to populate a table view with terms. Once the user clicks on one of the terms, another view pops up with the definition. What I can't figure out how to do yet is make section headers on that first table view (the one with the terms). I can do it quite easily with a plist, but I'm using a database pull instead. Can anyone point me in the right direction to understand how I can accomplish this?

Thanks in advance for all responses
 

HawaiiMacAddict

macrumors 6502a
Original poster
Dec 28, 2006
904
0
On one of my Macs of course
Aloha everyone,

After thinking about this one for a bit, I added a new column (field) to my SQLite table (basically re-creating it, but I only have five items in it anyway :D) named 'key' containing the first letter of the term for that entry. I want to show the index down the right-hand side of the tableview, but only show the letters for which I have associated terms beginning with them (the letter in the index). I was thinking about using a for loop to go through that field, counting up the terms beginning with each letter and returning the count as the value for numberOfRowsInSection: method.

Does that sound as if I'm on the right track or is there a simpler way to do this?

Thanks in advance for your responses
 

HawaiiMacAddict

macrumors 6502a
Original poster
Dec 28, 2006
904
0
On one of my Macs of course
Aloha dejo,

Thanks for your response. I was hoping that an easier way could be had, and that someone with more experience with SQL than I could give me a nudge in the right direction.

Here's another question. What with iPhone OS 3.0 having the Core Data API built in, how long would you suggest developers such as myself continue to use SQL?

Thanks again in advance for your response
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.