lua-users home
lua-l archive

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


Peter Loveday wrote:
> Something like:
>     lua_pushstring(L, "MyChunkFunc");
>     lua_load (L, ...);
>     lua_settable(L, LUA_REGISTRYINDEX);

Woo!  You people are the best.  :)

Well, I have things chugging along quite nicely now (I ended
up putting the function objects into fields of a single global
table like the standard lua packages, since I wanted scripts
to be able to call each other; I even tried letting scripts
auto-load each other by using the __index metafunction
of this table, which is fun but has some issues I'll revisit
when I think that this is a good idea rather than just being
cute).

I'm enjoying lua so far.  Thanks for the help, everyone.

Regards,
--Adam
-- 
Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3
"Beware the leader who bangs the drums of war in order to whip the
citizenry into a patriotic fervor, for patriotism ... both emboldens
the blood, just as it narrows the mind." -- Julius Caesar