lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I'm pretty sure that there isn't; but I also think there's a power patch to allow it.

-Rob

"Brian Weed" <brianw@imaginengine.com> wrote:

>Is there a way to do this:
> 
>t = {
>    foo = function() end,
>    bar = some_global_function(foo),
>}
> 
>Currently I'm handling that by doing the following:
> 
>t = {
>    foo = function() end,
>}
>t.bar = some_global_function(t.foo)
> 
>Is there some other syntax that I don't know about that would allow me
>to reference a table member from inside the table definition?
> 
>Brian