Tableview issues - crashes due to too many pictures...I think.

Hey guys, this is my first post. I'm really impressed by all the knowledge and help I see on these boards, and this is actually the first time I've had to post a question of my own without getting answers already submitted by others. Now on to the issue:

I'm making a wine list using tableview.lua. It sorts wines by various categories with a picture of the label and various information. Generally everything is working hunky dory. For the Red wine section, when it tries to load up all wines(about 100 list items), the program stops for a couple seconds and then crashes. when I had it loading a default image instead of individual labels, it worked fine. All other, smaller, sections work fine. (This is on the device. The emulator runs everything just fine) I've optimized all my PNG's to very small file sizes, but this doesn't make a difference. I'm assuming that the issue is the list size/picture load because I'm using identical code for all my different wine pages (copied pasted several times to make sure).

I tried to use table view XL, but as of right now it can't sort by categories, so if I use it, I end up loading the whole wine list (very quickly too, I might add). Any ideas on how to solve my issue?

(sorry for the long post)

Just an update:

my total table file has approx. 160 entries. I tried creating a separate file with just the large chunk (comprised of 5 total categories) that won't load (about 100 items with pictures). Each discrete category has no problem loading, but when I try to load all 5, the app crashes. If I take it down to 3 categories (about 50 items with pictures), it works.

I also noticed that the Tableview XL library has a header portion commented out, but fiddling with that didn't get me anywhere either.

Update:

if anyone is having similar problems, I've temporarily worked around it by preloading the images into my Main.lua. It's a dirty solution since changes in my table won't be reflected, but it's working for the short term. If anyone has anything better to offer, I'd be glad to hear it.

views:1304 update:2011/9/27 18:14:54
corona forums © 2003-2011