Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

typecasting -1 value

Status
Not open for further replies.

RyanEK

Programmer
Apr 30, 2001
323
AU
Hello,

I have come across something peculiar. When typecasting -1 in a combobox (or any other component for that matter), and then try to retrieve the value back
ie.

integer(ComboBox1.items.objects[ComboBox1.itemindex]);

... I get an EStringListError. However it works with any other -ve value.

Does anyone know how to overcome this problem?

thanks
 
Could you elaborate on what you're trying to do and why?
 
Isnt this because the '-1' value as applied to this and other componets is used as a flag to indicate that no strings (or objects) are present. and so cannot be evaluated as such.
in effect you are trying to use an invalid index.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top