Tim,

> I'm starting to think I'll need to parse all of the values out
> of the
> delimited string and populate an array with them (yuk).  There
> has to be a
> better way.  What am I missing here?

Yup, parsing the string is what you do, but you don't need to
convert it to an array if all you need is a single value from it.
When I create a listbox titled with a semi-colon string that I
might need to change, I also put a copy of the string in an
edittext control, but make it hidden. This way the user doesn't
see it, but I can read and change both it and the listbox title
from a "calling" subroutine.

To determine which value is indicated by the value of the
control, build yourself a function that will extract a subsctring
by an index into a semi-colon delimited string. Make it clean and
generic and you'll find uses for it again and again.

Alternatively, you can fill your listbox with an array and make
it global, so that calling routines can make use of it or change
it. I like the first approach better, but only because I prefer
to minimize reliance on globals unless I really need them. But
either way will do the job and the array method involves less
coding.

- Bill Thoen


----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to