TK grid error.

S

STEPHEN BECKER I V

Just trying a TK example i found and i get an error
####code
br = ["one", "and", "one"].collect { |c|
TkButton.new(root, "text"=>c)
}
TkGrid.grid(br[0], br[1], br[2], "columnspan"=>2 )

TkButton.new(root, "text"=>"is").grid("columnspan"=>3, "sticky"=>"ew")
TkButton.new(root, "text"=>"two").grid("row"=>1, "col"=>3, "columnspan"=>3)


Tk.mainloop

####code

The error is
Z:/ruby/playfair_final.rb:56: undefined method `grid' for
TkGrid:Module (NoMethodError)
Becker
 
H

Hidetoshi NAGAI

Hi,

From: STEPHEN BECKER I V <[email protected]>
Subject: TK grid error.
Date: Thu, 30 Sep 2004 23:21:00 +0900
Message-ID: said:
Just trying a TK example i found and i get an error (snip)
TkGrid.grid(br[0], br[1], br[2], "columnspan"=>2 )

Thank you for your report.
If you don't mind changing the script, please use
Tk.grid or TkGrid.configure.
I'll revive TkGrid.grid, TkPack.pack and TkPlace.place
by reason of backward-compatibility.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,416
Latest member
LionelQ387

Latest Threads

Top