* ext/tk/lib/tk/canvas.rb: *** POTENTIALLY INCOMPATIBLE ***
'tags' option of a TkcItem object gives a list of TkcTag objects. * ext/tk/lib/tkextlib/vu/dial.rb: fix logical bug. * ext/tk/lib/tk/canvas.rb, ext/tk/lib/tkextlib/blt/component.rb: lack of support for methodcall_optkeys. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
40229f892c
commit
cb732bbbdc
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Tue Oct 6 06:26:00 2009 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* * ext/tk/lib/tk/canvas.rb: *** POTENTIALLY INCOMPATIBLE ***
|
||||||
|
'tags' option of a TkcItem object should give a list of TkcTag objs.
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/vu/dial.rb: fix logical bug.
|
||||||
|
|
||||||
|
* ext/tk/lib/tk/canvas.rb, ext/tk/lib/tkextlib/blt/component.rb:
|
||||||
|
lack of support for methodcall_optkeys.
|
||||||
|
|
||||||
Mon Oct 5 12:22:12 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Mon Oct 5 12:22:12 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* array.c (rb_ary_{times, shuffle_bang, sample}): reducing macro
|
* array.c (rb_ary_{times, shuffle_bang, sample}): reducing macro
|
||||||
|
@ -25,7 +25,10 @@ module TkCanvasItemConfig
|
|||||||
private :__item_methodcall_optkeys
|
private :__item_methodcall_optkeys
|
||||||
|
|
||||||
def __item_val2ruby_optkeys(id) # { key=>proc, ... }
|
def __item_val2ruby_optkeys(id) # { key=>proc, ... }
|
||||||
super(id).update('window'=>proc{|i, v| window(v)})
|
super(id).update('window'=>proc{|i, v| window(v)},
|
||||||
|
'tags'=>proc{|i, v|
|
||||||
|
simplelist(v).collect{|tag| TkcTag.id2obj(self, tag)}
|
||||||
|
})
|
||||||
end
|
end
|
||||||
private :__item_val2ruby_optkeys
|
private :__item_val2ruby_optkeys
|
||||||
|
|
||||||
@ -690,7 +693,7 @@ class TkcItem<TkObject
|
|||||||
args = args.flatten
|
args = args.flatten
|
||||||
end
|
end
|
||||||
|
|
||||||
[args, fontkeys]
|
[args, fontkeys, methodkeys]
|
||||||
end
|
end
|
||||||
private_class_method :_parse_create_args
|
private_class_method :_parse_create_args
|
||||||
|
|
||||||
@ -698,10 +701,11 @@ class TkcItem<TkObject
|
|||||||
unless self::CItemTypeName
|
unless self::CItemTypeName
|
||||||
fail RuntimeError, "#{self} is an abstract class"
|
fail RuntimeError, "#{self} is an abstract class"
|
||||||
end
|
end
|
||||||
args, fontkeys = _parse_create_args(args)
|
args, fontkeys, methodkeys = _parse_create_args(args)
|
||||||
idnum = tk_call_without_enc(canvas.path, 'create',
|
idnum = tk_call_without_enc(canvas.path, 'create',
|
||||||
self::CItemTypeName, *args)
|
self::CItemTypeName, *args)
|
||||||
canvas.itemconfigure(idnum, fontkeys) unless fontkeys.empty?
|
canvas.itemconfigure(idnum, fontkeys) unless fontkeys.empty?
|
||||||
|
canvas.itemconfigure(idnum, methodkeys) unless methodkeys.empty?
|
||||||
idnum.to_i # 'canvas item id' is an integer number
|
idnum.to_i # 'canvas item id' is an integer number
|
||||||
end
|
end
|
||||||
########################################
|
########################################
|
||||||
|
@ -1268,7 +1268,7 @@ module Tk::BLT
|
|||||||
args = []
|
args = []
|
||||||
end
|
end
|
||||||
|
|
||||||
[args, fontkeys]
|
[args, fontkeys, methodkeys]
|
||||||
end
|
end
|
||||||
private_class_method :_parse_create_args
|
private_class_method :_parse_create_args
|
||||||
|
|
||||||
@ -1276,18 +1276,20 @@ module Tk::BLT
|
|||||||
unless self::MarkerTypeName
|
unless self::MarkerTypeName
|
||||||
fail RuntimeError, "#{self} is an abstract class"
|
fail RuntimeError, "#{self} is an abstract class"
|
||||||
end
|
end
|
||||||
args, fontkeys = _parse_create_args(keys)
|
args, fontkeys, methodkeys = _parse_create_args(keys)
|
||||||
idnum = tk_call_without_enc(chart.path, 'marker', 'create',
|
idnum = tk_call_without_enc(chart.path, 'marker', 'create',
|
||||||
self::MarkerTypeName, *args)
|
self::MarkerTypeName, *args)
|
||||||
chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
|
chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
|
||||||
|
chart.marker_configure(idnum, methodkeys) unless methodkeys.empty?
|
||||||
idnum.to_i # 'item id' is an integer number
|
idnum.to_i # 'item id' is an integer number
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create_type(chart, type, keys={})
|
def self.create_type(chart, type, keys={})
|
||||||
args, fontkeys = _parse_create_args(keys)
|
args, fontkeys, methodkeys = _parse_create_args(keys)
|
||||||
idnum = tk_call_without_enc(chart.path, 'marker', 'create',
|
idnum = tk_call_without_enc(chart.path, 'marker', 'create',
|
||||||
type, *args)
|
type, *args)
|
||||||
chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
|
chart.marker_configure(idnum, fontkeys) unless fontkeys.empty?
|
||||||
|
chart.marker_configure(idnum, methodkeys) unless methodkeys.empty?
|
||||||
id = idnum.to_i # 'item id' is an integer number
|
id = idnum.to_i # 'item id' is an integer number
|
||||||
obj = self.allocate
|
obj = self.allocate
|
||||||
obj.instance_eval{
|
obj.instance_eval{
|
||||||
|
@ -32,10 +32,10 @@ class Tk::Vu::Dial < TkWindow
|
|||||||
|
|
||||||
def coords(val = nil)
|
def coords(val = nil)
|
||||||
if val
|
if val
|
||||||
tk_split_list(tk_send_without_enc('coords'))
|
|
||||||
else
|
|
||||||
tk_send_without_enc('coords', val)
|
tk_send_without_enc('coords', val)
|
||||||
self
|
self
|
||||||
|
else
|
||||||
|
tk_split_list(tk_send_without_enc('coords'))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user