lua-users home
lua-l archive

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


   Hmm... no not really, the point is to communicate constraints to some
other system such as a UI component which can then alter the GUI
accordingly. I also think such an addition could be very useful.

/Stefan

-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Luiz Henrique
de Figueiredo
Sent: 13 June 2006 16:47
To: Lua list
Subject: Re: Lua 5.1.1 has been frozen

>Ability to add custom metadata (or some kind of attributes like in C#)

This is better done using a table constructor that can then check for
validity.
Your example would be something like this:

  SomeTable = MyTypedTable{
	  a = 1,
	  b = 2,
	  objname = "test.obj",
  }

  function MyTypedTable(t) <do validation here> end

--lhf