Tim,

Further to the comments you have already received, there are some MapBasic
samples supplied with the program to assist with this sort of thing.

Look at the Functions and Procedures contained in:

{mapbasic folder}\samples\mapbasic\lib\str_lib.mb

Chris Perry
Manager Mapping Systems
Parks Victoria
Melbourne Australia
Ph: 613 9816 6800
Fax: 613 9816 7222
[EMAIL PROTECTED]


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, 22 January 1999 4:26
To: [EMAIL PROTECTED]
Subject: MI MB: Listbox help



Hi.  I'm writing an application that has a listbox control.  This listbox is
populated by a semicolon-delimited string.  After the user picks one of the
items, I want to capture the name of the item they select.  I tried using
the
Into clause in the control, and also ReadControlValue, but they both simply
return the index position of the item in the list.

Example - My string is "USA;Canada;Mexico".  If the user chooses Mexico, I
want to put the word "Mexico" into a string variable.  Using the "into"
clause, I get a 3.  ReadControlValue returns a 3.

I can't use an array because the string is returned from a call to a custom
function, and arrays are not valid return types.  Since the number and
content of the values will change every time it's run, I can't use a Do Case
type of thing.

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?


Thanks -

  Tim Nuteson
  Dayton Hudson Corp.
  [EMAIL PROTECTED]
  612.370.6763
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
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