Hi all.

I have an app that displays a list of products to the user. The user can opt
to view the entire list of products or one of several categories of
products.  I'm using a custom list callback function that calls
DmSeekRecordInCategory to find the proper record to display. This works
fine.

Now, my client wants to add a checkbox that allows them to filter the list
based on whether the item is active or not. That value is a 0 or 1 stored in
a UInt8 field in the data record.

I'm trying to figure out how to hide/display based on the active value
efficiently. As far as I can tell, I can no longer use
DmSeekRecordInCategory in my list callback function since I can't go solely
by the category anymore. The only way I can think of would be to iterate
through the whole category from the beginning, checking the active value
until I get to the requested line of data to display. That seems very
inefficient, especially when the list is 300+ items.

Is there some built-in data filter mechanism that I'm missing? Or do I need
a different approach, like determining the active/inactive records at
startup and then putting them into an array or something?

Thanks for the help.
Mike Boone
http://boonedocks.net/



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to