Method: Tk::Text#image_cget

Defined in:
lib/tk/text.rb

#image_cget(index, slot) ⇒ Object



431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# File 'lib/tk/text.rb', line 431

def image_cget(index, slot)
  unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__
    image_cget_strict(index, slot)
  else
    begin
      image_cget_strict(index, slot)
    rescue => e
      begin
        if current_image_configinfo(index).has_key?(slot.to_s)
          # not tag error & option is known -> error on known option
          fail e
        else
          # not tag error & option is unknown
          nil
        end
      rescue
        fail e  # tag error
      end
    end
  end
end