Class: Tk::TclX::XPG3_MsgCat
Instance Method Summary collapse
- #close(fail_mode = false) ⇒ Object
- #get(setnum, msgnum, defaultstr) ⇒ Object
-
#initialize(catname, fail_mode = false) ⇒ XPG3_MsgCat
constructor
A new instance of XPG3_MsgCat.
Constructor Details
permalink #initialize(catname, fail_mode = false) ⇒ XPG3_MsgCat
Returns a new instance of XPG3_MsgCat.
52 53 54 55 56 57 58 |
# File 'lib/tkextlib/tclx/tclx.rb', line 52 def initialize(catname, fail_mode=false) if fail_mode @msgcat_id = Tk.tk_call('catopen', '-fail', catname) else @msgcat_id = Tk.tk_call('catopen', '-nofail', catname) end end |
Instance Method Details
permalink #close(fail_mode = false) ⇒ Object
[View source]
60 61 62 63 64 65 66 67 |
# File 'lib/tkextlib/tclx/tclx.rb', line 60 def close(fail_mode=false) if fail_mode Tk.tk_call('catclose', '-fail', @msgcat_id) else Tk.tk_call('catclose', '-nofail', @msgcat_id) end self end |
permalink #get(setnum, msgnum, defaultstr) ⇒ Object
[View source]
69 70 71 |
# File 'lib/tkextlib/tclx/tclx.rb', line 69 def get(setnum, msgnum, defaultstr) Tk.tk_call('catgets', @msgcat_id, setnum, msgnum, defaultstr) end |