summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/itemconfig.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-11-06 06:56:37 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-11-06 06:56:37 +0000
commit1d82954444cba4017a26ee5feff93e885dba2245 (patch)
treed3b0cb578874bf8dcf8fd74ad5c39e444d5fd3df /ext/tk/lib/tk/itemconfig.rb
parent2734015cfe474868ee051ed4cfe6cdee0d0c3dc5 (diff)
* ext/tk/lib/tk/itemconfig.rb: bug fix on 'itemconfiginfo' method, and
modify to make it easy to override 'itemconfiginfo' method. * ext/tk/lib/tkextlib/tile/treeview.rb : support Tile 0.7.8. * ext/tk/lib/tkextlib/version.rb : [new] add Tk::Tkextlib_RELEASE_DATE to get the information from scripts. * ext/tk/lib/tk.rb: load 'tkextlib/version.rb', and update RELEASE_DATE. * ext/tk/lib/tkextlib/SUPPORT_STATUS: update. * ext/tk/sample/editable_listbox.rb: [new] the listbox with editable items. It's one of the example about usage of Place geometry manager. * ext/tk/sample/tktextio.rb: improve the functions of TkTextIO class. Those are required by 'irbtkw.rbw'. * ext/tk/sample/irbtkw.rbw: [new] IRB on Ruby/Tk. It doesn't need any real console. IRB works on a text widget without I/O blocking. That is, thread switching on IRB will work properly, even if on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk/itemconfig.rb')
-rw-r--r--ext/tk/lib/tk/itemconfig.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/ext/tk/lib/tk/itemconfig.rb b/ext/tk/lib/tk/itemconfig.rb
index 0b84be38b8..30d589de82 100644
--- a/ext/tk/lib/tk/itemconfig.rb
+++ b/ext/tk/lib/tk/itemconfig.rb
@@ -289,7 +289,7 @@ module TkItemConfigMethod
self
end
- def itemconfiginfo(tagOrId, slot = nil)
+ def __itemconfiginfo_core(tagOrId, slot = nil)
if TkComm::GET_CONFIGINFO_AS_ARRAY
if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/)
fontkey = $2
@@ -594,7 +594,7 @@ module TkItemConfigMethod
if v.empty?
conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = nil
else
- conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = TkVarAccess.new
+ conf[__item_configinfo_struct(tagid(tagOrId))[:current_value]] = TkVarAccess.new(v)
end
end
@@ -1020,13 +1020,18 @@ module TkItemConfigMethod
end
end
end
+ private :__itemconfiginfo_core
+
+ def itemconfiginfo(tagOrId, slot = nil)
+ __itemconfiginfo_core(tagOrId, slot)
+ end
def current_itemconfiginfo(tagOrId, slot = nil)
if TkComm::GET_CONFIGINFO_AS_ARRAY
if slot
org_slot = slot
begin
- conf = itemconfiginfo(tagOrId, slot)
+ conf = __itemconfiginfo_core(tagOrId, slot)
if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \
|| conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
return {conf[0] => conf[-1]}
@@ -1037,7 +1042,7 @@ module TkItemConfigMethod
"there is a configure alias loop about '#{org_slot}'"
else
ret = {}
- itemconfiginfo(tagOrId).each{|conf|
+ __itemconfiginfo_core(tagOrId).each{|conf|
if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \
|| conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 )
ret[conf[0]] = conf[-1]
@@ -1047,7 +1052,7 @@ module TkItemConfigMethod
end
else # ! TkComm::GET_CONFIGINFO_AS_ARRAY
ret = {}
- itemconfiginfo(slot).each{|key, conf|
+ itemconfiginfo(tagOrId, slot).each{|key, conf|
ret[key] = conf[-1] if conf.kind_of?(Array)
}
ret