[Zope] getting object types?

Jim Washington jwashin@vt.edu
Thu, 01 Apr 1999 16:38:41 +0000


I'm sure this must be easy, but I have been searching the lists and
documentation for a couple of hours and could not find how to do it.

What I want to do is get info from an HTML multiple-select list box that
looks like: 

<select multiple Name="persons">
<!--#in mylist-->
<option value="<!--#var index-->" >
<!--#var firstname--> <!--#var lastname--></option>
<!--#/in-->
</select>

Unfortunately, if there is only a single item selected, RESPONSE.person
is a string, and if multiple items are selected, it is a list.

I want to use  <!--#in persons-->, but that does not work for string
objects, so if a single value is selected, it bombs.

I would not mind using an #if, but I cannot find the mechanism for
finding the type of the RESPONSE.persons object.

Any suggestions?

--Jim Washington