def view_properties field=@form.get_current_field
    alert "Nil field" unless field
    return unless field
    text = ["Instance Variables"]
    text << "------------------"
    #iv = field.instance_variables.map do |v| v.to_s; end
    field.instance_variables.each do |v|
      val = field.instance_variable_get(v)
      klass = val.class
      if val.is_a? Array 
        val = val.size
      elsif val.is_a? Hash
        val = val.keys
      end
      case val
      when String, Integer, TrueClass, FalseClass, NilClass, Array, Hash, Symbol
        ;
      else
        val = "Not shown"
      end
      text << "%20s  %10s  %s" % [v, klass, val]
    end
    text << " "
    text << "Public Methods"
    text << "--------------"
    pm = field.public_methods(false).map do |v| v.to_s; end
    text +=  pm
    text << " "
    text << "Inherited Methods"
    text << "-----------------"
    pm = field.public_methods(true) - field.public_methods(false)
    pm = pm.map do |v| v.to_s; end
    text +=  pm

    #$log.debug "  view_properties #{s.size} , #{s} "
    textdialog text, :title => "Properties"
  end
def view_properties field=@form.get_current_field
    alert "Nil field" unless field
    return unless field
    text = ["Instance Variables"]
    text << "------------------"
    #iv = field.instance_variables.map do |v| v.to_s; end
    field.instance_variables.each do |v|
      val = field.instance_variable_get(v)
      klass = val.class
      if val.is_a? Array 
        val = val.size
      elsif val.is_a? Hash
        val = val.keys
      end
      case val
      when String, Integer, TrueClass, FalseClass, NilClass, Array, Hash, Symbol
        ;
      else
        val = "Not shown"
      end
      text << "%20s  %10s  %s" % [v, klass, val]
    end
    text << " "
    text << "Public Methods"
    text << "--------------"
    pm = field.public_methods(false).map do |v| v.to_s; end
    text +=  pm
    text << " "
    text << "Inherited Methods"
    text << "-----------------"
    pm = field.public_methods(true) - field.public_methods(false)
    pm = pm.map do |v| v.to_s; end
    text +=  pm

    #$log.debug "  view_properties #{s.size} , #{s} "
    textdialog text, :title => "Properties"
  end
for the current field, display the instance variables and their values
  as well as the public methods.
 (We can do this in a tree format too)