lua-users home
lua-l archive

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


Hi all,

I've recently started embedding Lua as a configuration/script extension to a
program I am working on. I've got some of the basics down, at least enough for
simple configs. At the moment however I'm trying to work with someting like
this:

application = {
   exec = '/bin/ls',
	can_restart = function(exit_code)
		return exit_code ~= 0
	end
}

I can store the value of application.exec, but I would love to be able to
somehow store application.can_restart so that I can utilize it later. Despite
scoping issues within the function, is there anyway something like this can be
done?

Thanks in advance!

~ Matthew

Attachment: signature.asc
Description: Digital signature