RuntimeError: wrong # args: should be “::ttk::dialog::clientframe dlg”
from /usr/local/lib/ruby/1.8/tk.rb:1694:in _invoke_without_enc' from /usr/local/lib/ruby/1.8/tk.rb:1694:in_ip_invoke_core’
from /usr/local/lib/ruby/1.8/tk.rb:1730:in _tk_call_core' from /usr/local/lib/ruby/1.8/tk.rb:1758:intk_call_without_enc’
from /usr/local/lib/ruby/1.8/tkextlib/tile/dialog.rb:54:in
`client_frame’
It seems that Tk::Tile::Dialog#client_frame launches an incorrect
command
against tcl.
It works at the Tcl/Tk level. This script (which I’ve constructed with a
considerable effort, as I don’t speak tcl):
/usr/local/lib/ruby/1.8/tk.rb:1694:in _invoke_without_enc': wrong # args: should be "::ttk::dialog::clientframe dlg" (RuntimeError) from /usr/local/lib/ruby/1.8/tk.rb:1694:in_ip_invoke_core’
from /usr/local/lib/ruby/1.8/tk.rb:1730:in _tk_call_core' from /usr/local/lib/ruby/1.8/tk.rb:1758:intk_call_without_enc’
from /usr/local/lib/ruby/1.8/tkextlib/tile/dialog.rb:54:in
`client_frame’
from ./dialogtst.rb:36
class Tk::Tile::Dialog
def client_frame
window(tk_call_without_enc(’::ttk::dialog::clientframe’, @path))
end
end
and do:
Dialog.new(:type=>‘okcancel’).clientframe
but then I get:
/usr/local/lib/ruby/1.8/tk.rb:1694:in _invoke_without_enc': bad window path name ".w00000.f" (RuntimeError) from /usr/local/lib/ruby/1.8/tk.rb:1694:in_ip_invoke_core’
from /usr/local/lib/ruby/1.8/tk.rb:1730:in _tk_call_core' from /usr/local/lib/ruby/1.8/tk.rb:1758:intk_call_without_enc’
from ./dialogtst.rb:32:in `client_frame’
from ./dialogtst.rb:37
Now, I know that the path of the dialog must be ‘.w00000’, so somewhere
‘.f’
is appended. Does anybody know where an why?
My appologies for persisting with this question, by I’m really stuck.
From: Christian S. [email protected]
Subject: Re: Problem with Tk::Tile::Dialog#client_frame
Date: Mon, 26 Mar 2007 03:51:19 +0900
Message-ID: [email protected]
Still trying to call Tk::Tile::Dialog#client_frame and still having problems.
(snip)
but then I get:
/usr/local/lib/ruby/1.8/tk.rb:1694:in _invoke_without_enc': bad window path name ".w00000.f" (RuntimeError) from /usr/local/lib/ruby/1.8/tk.rb:1694:in _ip_invoke_core’
from /usr/local/lib/ruby/1.8/tk.rb:1730:in _tk_call_core' from /usr/local/lib/ruby/1.8/tk.rb:1758:in tk_call_without_enc’
from ./dialogtst.rb:32:in `client_frame’
from ./dialogtst.rb:37
The real widget of Tk::Tile::Dialog is generated
when “show” method is called.
Before that, “client_frame” method returns an invalid widget path.
It is the specificaion of the widget.
But, I can understand that it is inconvenient.
I’ll consider better ways.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.