lua-users home
lua-l archive

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

>From: David Jeske <>
>On Wed, Dec 02, 1998 at 06:28:14PM -0200, Jon Kleiser wrote:
>> I'm about to write some C functions to provide Mac Lua with some
>> (hopefully) flexible dialog boxes. My idea was to let my Lua script define
>> the dialog box on the fly through a Lua table/list of item specs, somewhat
>> like this:
>>   name, pwd = dialog{{type=btn, name="OK"},{type=btn, name="Cancel"},
>>                      {type=fld, name="Name"},{type=pwfld, name="Password"}}
>You should look at the Lua/Tk binding for ideas..

right. the "proper" way is to be declarative:

dialog{button{name="OK"}, button{name="Cancel"},
       field{name="Name"}, password{name="Password"}}

if you need the field "type", then the constructors add these automatically:

function button(t)
	return t