[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: (Feature Request) Custom Attributes.
- From: Jamie Webb <j@...>
- Date: Fri, 19 Nov 2004 16:31:21 +0000
On Fri, Nov 19, 2004 at 04:22:41PM +0100, Roland Illig wrote:
> Timur Davidenko wrote:
> >Table = {
> > <UIWidget="slider" UIMin=0 UIMax=100>
> > Radius = 10,
...
> >}
>
> Table = {
> Radius = {
> attr = { UIWidget = "slider", UIMin = 0, UIMax = 100 },
> value = 10
> },
...
> }
>
> Something like that?
Or, if your data structure will have multiple instances, use a
separate table for attributes:
TableAttrs = {
Radius = { UIWidget = "slider", UIMin = 0, UIMax = 100 },
...
}
Table = {
-- Could reference the attributes table like this, or put the
-- attributes in the metatable, etc.
attr = TableAttrs,
Radius = 10,
...
}
-- Jamie Webb