diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-23 05:22:13 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-23 05:22:13 +0000 |
commit | 61a68941b1d22973dfb832e0575596d53f3e31b4 (patch) | |
tree | ad2e6871fc4bd6e4bfbfe2aa71b888e51a4b2261 /ext/tk/lib/tkextlib/tile/tnotebook.rb | |
parent | 280f8df3706176fac38ef42e3fc79d30ac6e1e16 (diff) |
Merge from ruby_1_8. Add files that have not been added yet.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tkextlib/tile/tnotebook.rb')
-rw-r--r-- | ext/tk/lib/tkextlib/tile/tnotebook.rb | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/ext/tk/lib/tkextlib/tile/tnotebook.rb b/ext/tk/lib/tkextlib/tile/tnotebook.rb index 075059d5cc..4d65e363da 100644 --- a/ext/tk/lib/tkextlib/tile/tnotebook.rb +++ b/ext/tk/lib/tkextlib/tile/tnotebook.rb @@ -41,13 +41,35 @@ class Tk::Tile::TNotebook < TkWindow private :__item_methodcall_optkeys #alias tabcget itemcget + #alias tabcget_strict itemcget_strict alias tabconfigure itemconfigure alias tabconfiginfo itemconfiginfo alias current_tabconfiginfo current_itemconfiginfo - def tabcget(tagOrId, option) + def tabcget_strict(tagOrId, option) tabconfigure(tagOrId, option)[-1] end + def tabcget(tagOrId, option) + unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ + tabcget_strict(tagOrId, option) + else + begin + tabcget_strict(tagOrId, option) + rescue => e + begin + if current_tabconfiginfo(tagOrId).has_key?(option.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 ################################ include Tk::Tile::TileWidget |