Nested tables.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Nested tables.

Paul Bleisch
lua-l,

I was curious if nested table definitions will be available in Lua 3.1
along with the other spiffy features like true first-class functions and
such.  What I would like to do is:

Momma = {
  Name = "Momma",
  Type = "Whatever"
}

Foo = {
  Parent = Momma,
  Name = "Main Window",
  Config = {bg="#FFFFFF", fg="#CCCCCC", pack="left"}
}

Currently, the Lua parser can't handle the Foo.Config definition.  This
syntax would make TkLua 100 million times easier to use.  Currently,
all types of temp tables are required to layout a gui using TkLua.

Paul
--
Paul Bleisch
[hidden email]