def select_list(name, identifier={:index => 0}, &block)
      standard_methods(name, identifier, 'select_list_for', &block)
      define_method(name) do
        return platform.select_list_value_for identifier.clone unless block_given?
        self.send("#{name}_element").value
      end
      define_method("#{name}=") do |value|
        return platform.select_list_value_set(identifier.clone, value) unless block_given?
        self.send("#{name}_element").select(value)
      end
      define_method("#{name}_options") do
        element = self.send("#{name}_element")
        (element && element.options) ? element.options.collect(&:text) : []
      end
    end
def select_list(name, identifier={:index => 0}, &block)
      standard_methods(name, identifier, 'select_list_for', &block)
      define_method(name) do
        return platform.select_list_value_for identifier.clone unless block_given?
        self.send("#{name}_element").value
      end
      define_method("#{name}=") do |value|
        return platform.select_list_value_set(identifier.clone, value) unless block_given?
        self.send("#{name}_element").select(value)
      end
      define_method("#{name}_options") do
        element = self.send("#{name}_element")
        (element && element.options) ? element.options.collect(&:text) : []
      end
    end
adds five methods - one to select an item in a drop-down,
 another to fetch the currently selected item text, another
 to retrieve the select list element, another to check the
 drop down's existence and another to get all the available options
 to select from.

 @example
   select_list(:state, :id => "state")
   # will generate 'state', 'state=', 'state_element', 'state?', "state_options" methods

 @param [Symbol] the name used for the generated methods
 @param [Hash] identifier how we find a select list.
 @param optional block to be invoked when element method is called