Type:
Class
Constants:
KEY_TBL
:
[
[ ?c, ?n, :item_num ],
[ ?d, ?s, :detail ],
[ ?D, ?l, :items ],
[ ?e, ?e, :event ],
[ ?I, ?n, :id ],
[ ?l, ?n, :lower_bound ],
[ ?p, ?n, :active_id ],
[ ?P, ?e, :pattern ],
[ ?S, ?l, :sel_items ],
[ ?T, ?w, :widget ],
[ ?u, ?n, :upper_bound ],
[ ?W, ?o, :object ],
[ ??, ?x, :parm_info ],
nil
]
- <'%' subst-key char>, <proc type char>, <instance var (accessor) name>
PROC_TBL : [ [ ?n, TkComm.method(:num_or_str) ], [ ?s, TkComm.method(:string) ], [ ?l, TkComm.method(:list) ], [ ?w, TkComm.method(:window) ], [ ?e, proc{|val| case val when /^<<[^<>]+>>$/ TkVirtualEvent.getobj(val[1..-2]) when /^<[^<>]+>$/ val[1..-2] else val end } ], [ ?o, proc{|val| TkComm.tk_tcl2ruby(val)} ], [ ?x, proc{|val| begin inf = {} Hash[*(TkComm.list(val))].each{|k, v| if keyinfo = KEY_TBL.assoc(k[0]) if cmd = PROC_TBL.assoc(keyinfo[1]) begin new_v = cmd.call(v) v = new_v rescue end end end inf[k] = v } inf rescue val end } ], nil ]
- <proc type char>, <proc/method to convert tcl-str to ruby-obj>