def select_prev_field
      return :UNHANDLED if @widgets.nil? or @widgets.empty?
      #$log.debug "insdie sele prev field :  #{@active_index} WL:#{@widgets.length}" 
      if @active_index.nil?
        @active_index = @widgets.length 
      else
        f = @widgets[@active_index]
        begin
          on_leave f
        rescue => err
         $log.error " Caught EXCEPTION #{err}"
         Ncurses.beep
#         $error_message = "#{err}" # changed 2010  
         $error_message.value = "#{err}"
         return
        end
      end

      f = @widgets[@active_index]
      index = @focusables.index(f)
      if index > 0
        index -= 1
        f = @focusables[index]
        if f
          select_field f
          return
        end
      end
      
      ## added on 2008-12-14 18:27 so we can skip to another form/tab
      # 2009-01-08 12:24 no recursion, can be stack overflows if no focusable field
      if @navigation_policy == :CYCLICAL
        f = @focusables.last
        select_field @widgets.index(f) if f
      end

      return :NO_PREV_FIELD
    end
def select_prev_field
      return :UNHANDLED if @widgets.nil? or @widgets.empty?
      #$log.debug "insdie sele prev field :  #{@active_index} WL:#{@widgets.length}" 
      if @active_index.nil?
        @active_index = @widgets.length 
      else
        f = @widgets[@active_index]
        begin
          on_leave f
        rescue => err
         $log.error " Caught EXCEPTION #{err}"
         Ncurses.beep
#         $error_message = "#{err}" # changed 2010  
         $error_message.value = "#{err}"
         return
        end
      end

      f = @widgets[@active_index]
      index = @focusables.index(f)
      if index > 0
        index -= 1
        f = @focusables[index]
        if f
          select_field f
          return
        end
      end
      
      ## added on 2008-12-14 18:27 so we can skip to another form/tab
      # 2009-01-08 12:24 no recursion, can be stack overflows if no focusable field
      if @navigation_policy == :CYCLICAL
        f = @focusables.last
        select_field @widgets.index(f) if f
      end

      return :NO_PREV_FIELD
    end
put focus on previous field
 will cycle by default, unless navigation policy not :CYCLICAL
 in which case returns :NO_PREV_FIELD.
 @return [nil, :NO_PREV_FIELD] nil if cyclical and it finds a field
  if not cyclical, and no more fields then :NO_PREV_FIELD