Accesing tables within tables

Find quick help here to get you started with Hollywood
Post Reply
tolkien
Posts: 195
Joined: Sun Oct 17, 2010 10:40 pm
Location: Spain

Accesing tables within tables

Post by tolkien »

One simple question:

Can I have a table
t1 = {boo = true, foo = false]

include that table within another table

t2 = {x=0, y=0, t1}

???

How do access to all members in t2?

Hope you understand.
tolkien
Posts: 195
Joined: Sun Oct 17, 2010 10:40 pm
Location: Spain

Re: Accesing tables within tables

Post by tolkien »

Well...I can do:

t1 = { x=0, y=0, t2={boo=false,foo=true}}

And acces the member

T1.x = 10
T1.t2.boo = true

But when using large tables can be a mess use this form. I wonder if I could use it like I said in my orevious post.

Thanks friends.
Mazze
Posts: 69
Joined: Thu May 06, 2010 8:08 pm

Re: Accesing tables within tables

Post by Mazze »

t1 = { x=0, y=0}
t1.t2={boo=false,foo=true}
DebugPrint(t1.t2.foo)
tolkien
Posts: 195
Joined: Sun Oct 17, 2010 10:40 pm
Location: Spain

Re: Accesing tables within tables

Post by tolkien »

Thanks! So obvious....that is of much help!
Post Reply