Enumeration Frustration



  • I am working with Proficy Portal, a GE product that provides fancy web based reporting of various data sources using a JAVA based infrastructure. (Who cares that it is hard coded to IE and that it fails to work on other browsers, or that if you change the browser User Agent string to report as being an IE browser then the system works again).

    One of the features of the product is your typical grid display for displaying rows and columns of data from a source. One of the fancy features of the grid is to allow you to treat the data in a column as an index, and to map that data to a different value for display via an enumeration function. Thus instead of displaying the raw column data of 0, 1, or 2, you see the enumerated result of "Car", "Truck" or "Bus".

    The grid also supports data editing, which allows the grid to write changes back to the source in a batch fashion. Typically the user would make multiple changes to the data on the grid, and when they are ready, they would click on an update button that would only then send the changes back to the source.

    The real fun comes when you combine enumeration with editing. In this case the selection of data in a cell is mapped to a drop down list that contains the enumerated values ("Car", "truck", "Bus" etc). But once you make a change, the cell displays the raw value (0, 1 or 2) rather than the enumeration, *until* you do the update, where upon it reverts to displaying the expected enumerated value.

    When I called them on this they said it was the defined behaviour.



  • @OzPeter said:

    When I called them on this they said it was the defined behaviour.
    "I'm sorry, sir, but that's defined behavior (or rather, it will be as soon as I get off the phone with you and add a line to the technical requirements about it)."



  • It's not a bug, it's a feature!



  • @Abdiel said:

    It's not a bug, it's a feature!
     

    It's not a bug if it's according to spec!

     

    Notice how I aptly left in the open as to whether or not the intended subject is an actual feature.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.