# File lib/xml_parser.rb, line 48
  def self.add_tabular_method(class_name)
    class_name.add_method("tabular_data") do
      |*argv|
      options = argv.shift || {}
      
      #-- If a wait tag is defined, the framework will loop until it has gotten the
      # information or the time is up.
      if(options[:wait] != nil)
        count = options[:wait]

        data = flex_object.getTabularData(@id, options[:start], options[:end])
        while(data != nil && count > 0)
          sleep(1)
          count = count - 1
          data = flex_object.getTabularData(@id, options[:start], options[:end])
        end
      else
        data = flex_object.getTabularData(@id, options[:start], options[:end])
      end
      
      return data
    end
    
    # This method extracts singular values
    class_name.add_method("tabular_data_value") do
      |arg|
      flex_object.getTabularDataValue(@id, arg)
    end
    
    # This method returns the index of the first visible row
    class_name.add_method("first_visible_row") do
      flex_object.firstVisibleRow(@id)
    end
    
    # This method returns the index of the last visible row
    class_name.add_method("last_visible_row") do
      flex_object.lastVisibleRow(@id)
    end
    
    # This method returns the number of rows
    class_name.add_method("num_rows") do
      flex_object.numRows(@id)
    end
    
    # This method returns the number of columns
    class_name.add_method("num_columns") do
      flex_object.numColumns(@id)
    end
    
    # This method returns the column names
    class_name.add_method("column_names") do
      flex_object.columnNames(@id)
    end
    
  end