On Tue, 27 Jun 2000, Daniel [iso-8859-1] �man wrote:
> All examples I see use a resource to populate a list. Sure I can either just use a
>normal Array or use the WinDrawChars in a
> callback routine when reading from the DB, but if I want to be able to use the list
>for selection (with a popup trigger), what is
> best practise? The array is btw > 200 and the list is shown on several forms in the
>application.
>
> / Daniel
Look at the MemoPad example (I think it's introduced in phase 8) in CW
examples/tutorial directory. It's well explained. You can modify this
technique to fit your needs. Ie. I have a lot of lists to generate on
various forms to display available objects for selection. I'm locking
DM record in AppStart, generate array of strings (object names and add.
info - null terminated each) and instead of SysFormPointerArrayToStrings()
put pointers into global CharPtr array to pass it to SetListChoices()...
In AppStop release all. So I don't have to release allocated handle each
time I leave the form (it's ok because I would have allocated that space
in almost every form).
Rgds,
-DR
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/