function _cm_getExtraData ($where, $fieldarray)
// Perform custom processing for the getExtraData method.
// $where = a string in SQL 'where' format.
// $fieldarray = the contents of $where as an array.
{
$this->lookup_data['input_state'] = $this->fieldspec['input_state']['values'];
I believe above code is the source. Using above code is an indexec array, while your lookup array is an associative one.
Your code will work because the 'abnormal' behaviour of the in_array only occurs whenusing indexed array, end only if index = '0'.
I've used above statement to fill up the lookup data because i do not have to change the code if the enumaration is changed in the database. This is done by the regeneration of the dict file.
I also uses the enum type here because depending on the contents of that field, I have to process the data in a specific and/or different way.
This interpretation of the enum type was also the reason to use the fieldspec['enumfield']['values'] directly in the std.validation.class.inc instead of the call
$enum = $this->caller->getValRep($fieldname)
because the fieldspec is passed as a parameter.
The getEnum on the other hand, retreives the enum values from the database.
I'm a little confused now about the prefered way to work with the enumaration type.