def add_active_record_rows(ar) # :nodoc:
      fields = ar.column_names.map { |x| x.to_sym }
      matches = fields & @column_keys #intersection
      ar.each do |obj|
        row = add_row()
        matches.each do |f|
#          begin  
            row[f] = obj[f] unless obj[f].nil?
#          rescue
#            row[f] = obj[f].to_s
#          end
        end          
      end
      self.visible = true
    end
def add_active_record_rows(ar) # :nodoc:
      fields = ar.column_names.map { |x| x.to_sym }
      matches = fields & @column_keys #intersection
      ar.each do |obj|
        row = add_row()
        matches.each do |f|
#          begin  
            row[f] = obj[f] unless obj[f].nil?
#          rescue
#            row[f] = obj[f].to_s
#          end
        end          
      end
      self.visible = true
    end
The new() constructor takes a Hash that defines the columns as its only argument.  The Hash defines
 symbols as the keys to give an ID to each column.  The Hash also defines the type (class) of the column.
 A simple constructor looks like this:
 @example
  @view = VR::ListView.new(:name => String, :date => DateTime)

 You can create columns with any type of data including your own classes, and classes subclassed
 from ActiveRecordBase.  The common types that are included by default are:

 * String - Displays and edits as a String.
 * Integer - Displays numadd_activeber, edits like a String.
 * FixNum - ditto
 * Integer - ditto
 * Float - ditto
 * DateTime - Displays in a default date format(editable), edits like a String
 * TrueClass - Displays as a GtkCheckButton, click checkbox to edit
 * GdkPixbuf - Just an Image, uneditable
 * VR::Col::CalendarCol - Displays in a default date format(editable), calendar window to edit.
 * VR::Col::SpinCol - Displays as a number with default number of digits, edits like a GtkSpinButton
 * VR::Col::ComboCol - Displays String, edits like a GtkComboBoxEntry
 * VR::Col::ProgressCol - Displays a GtkProgressBar, uneditable
 * VR::Col::BlobCol - For long strings.  Displays first 20 characters in view, edits with simple text editor.

 You can also add your own user-defined column types.  See: {Adding Your Own Objects to ListView}[link:/site/ListView%20Tutorial.html#objects].