def print_key_bindings *args
          f  = get_current_field
          #labels = [@key_label, f.key_label]
          #labels = [@key_label]
          #labels << f.key_label if f.key_label
          labels = []
          labels << (f.key_label || {}) #if f.key_label
          labels << @key_label
          arr = []
          if get_current_field.help_text 
            arr << get_current_field.help_text 
          end
          labels.each_with_index { |h, i|  
            case i
            when 0
              arr << "  ===  Current widget bindings ==="
            when 1
              arr << "  === Form bindings ==="
            end

            h.each_pair { |name, val| 
              if name.is_a? Integer
                name = keycode_tos name
              elsif name.is_a? String
                name = keycode_tos(name.getbyte(0))
              elsif name.is_a? Array
                s = []
                name.each { |e|
                  s << keycode_tos(e.getbyte(0))
                }
                name = s
              else
                #$log.debug "XXX: KEY #{name} #{name.class} "
              end
              arr << " %-30s %s" % [name ,val]
              $log.debug "KEY: #{name} : #{val} "
            }
          }
          textdialog arr, :title => "Key Bindings"
        end
def print_key_bindings *args
          f  = get_current_field
          #labels = [@key_label, f.key_label]
          #labels = [@key_label]
          #labels << f.key_label if f.key_label
          labels = []
          labels << (f.key_label || {}) #if f.key_label
          labels << @key_label
          arr = []
          if get_current_field.help_text 
            arr << get_current_field.help_text 
          end
          labels.each_with_index { |h, i|  
            case i
            when 0
              arr << "  ===  Current widget bindings ==="
            when 1
              arr << "  === Form bindings ==="
            end

            h.each_pair { |name, val| 
              if name.is_a? Integer
                name = keycode_tos name
              elsif name.is_a? String
                name = keycode_tos(name.getbyte(0))
              elsif name.is_a? Array
                s = []
                name.each { |e|
                  s << keycode_tos(e.getbyte(0))
                }
                name = s
              else
                #$log.debug "XXX: KEY #{name} #{name.class} "
              end
              arr << " %-30s %s" % [name ,val]
              $log.debug "KEY: #{name} : #{val} "
            }
          }
          textdialog arr, :title => "Key Bindings"
        end
def print_key_bindings * args f = get_current_field #labels = [@key_label, f.key_label] #labels = [@key_label] #labels << f.key_label if f.key_label labels = [ ] labels << ( f . key_label || { } ) #if f.key_label labels << @key_label arr = [ ] if get_current_field . help_text arr << get_current_field . help_text end labels . each_with_index { | h , i | case i when 0 arr << "  ===  Current widget bindings ===" when 1 arr << "  === Form bindings ===" end h . each_pair { | name , val | if name . is_a? Integer name = keycode_tos name elsif name . is_a? String name = keycode_tos ( name . getbyte ( 0 ) ) elsif name . is_a? Array s = [ ] name . each { | e | s << keycode_tos ( e . getbyte ( 0 ) ) } name = s else #$log.debug "XXX: KEY #{name} #{name.class} " end arr << " %-30s %s" % [ name , val ] $log . debug "KEY: #{name} : #{val} " } } textdialog arr , :title => "Key Bindings" end
Display key bindings for current widget and form in dialog
Display key bindings for current widget and form in dialog