I have just started using ruby after 15 years with Tcl/Tk/C/C++
and have encountered a problem trying to create a second
toplevel window. This was trivial in tcl. In ruby the second
window has the same object reference as the first, so everything
gets packed together.
Is this a bug or a feature of the ruby Tk implementation?
This is the extract:
$window[‘root’] = TkRoot.new { title “ttlog : version 2.2” }
puts $window[‘root’]
$window[‘today’] = TkRoot.new { title “Todays news” }
puts $window[‘news’]
On Thu, 23 Nov 2006 09:41:27 +0900, Morton G. wrote:
second = TkToplevel.new(root) { title “Todays news” }
Hope this helps.
Regards, Morton
Thanks Morton; just what I was looking for. In Tcl you use toplevel
to create what I call a “root” window. The Pickaxe does not go
into much detail - perlTk book in the post.
Thanks again, and apologies for the elementary question.
Thanks Morton; just what I was looking for. In Tcl you use toplevel
to create what I call a “root” window. The Pickaxe does not go
into much detail - perlTk book in the post.
I must say, despite the advice in the Pickaxe book, I have not found
perl/Tk documentation to be all that useful – that may be because I
don’t know zip about perl. What I rely on, besides the Tcl/Tk man
pages and the Tk documentation available on the web, are:
Thanks again, and apologies for the elementary question.
No need for apologies. We all start from square one. I’m no Ruby/Tk
expert. I’m on square two. I’ve asked even more elementary Ruby/Tk
questions on this list myself and quite recently at that.
On Sat, 25 Nov 2006 11:48:49 +0900, Morton G. wrote:
------ text excised -------------
I must say, despite the advice in the Pickaxe book, I have not found
perl/Tk documentation to be all that useful – that may be because I
don’t know zip about perl. What I rely on, besides the Tcl/Tk man
pages and the Tk documentation available on the web, are:
Right, I have them bookmarked now. Will check them out later.
I am impressed with the ease and speed of development in ruby. It has
taken about 12 days to to learn the basics and rewrite a user interface
which needs to be in production by Tuesday. Bullet-proofing comes
later.
The only outstanding problem is how to get BLT to work (for xy plots)
but
those websites above may have some answers.
1.upto(1000) { puts “Thanks” }
Len
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.