A list draw callback function can get its data to draw from absolutely anywhere. In your case, all you need is a correspondence between the list index and the database record number. If the correspondence is not the identity correspondence, it is pretty simple to allocate and save (say in a global) a vector of record indices at form initialization time to hold such a correspondence.
-bob mckenzie palmsource pdx -----Original Message----- From: Benjamin Brazil [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 10:30 AM To: Palm Developer Forum Subject: lists and dynamic runtime lists Hello, With regards to my previous question of how to create a list at runtime, by retrieving the strings from a database, where each string is stored as a single record, I am not clear as to what the drawback function to use would be. The code examples that I have to create runtime lists all seem to require the list to be in existence already, which has been hard coded as a string list resource. The functions LstSetDrawFunction and LstSetListChoices which I would like to use require the list data structure to have been created already. Is it therefore possible to create a list data structure dynamically by retrieving the strings from the database where each string is stored as a single record. Once the list datastructure would have been created it would then be straight forward to create the list. Any assistance would be greatly appreciated, Thank you, Benjamin Brazil. >>Could anyone tell me where I could find an example of how to create >>this list at runtime, or provide me with some hints. >You can use a list drawback function, sidestepping the whole issue of >constructing the list. All you need to do is initialize it: # items, >selection, etc. > _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
