lua-users home
lua-l archive

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


Timur Davidenko wrote:

 > Is anything wrong with:

Table = {
 Radius = 10,
 Radius_attr = { UIWidget = "slider", UIMin = 0, UIMax = 100 }
}

for syntax reasons, i convert xml attrs to lua as :

Table = {
	["@"] = { UIWidget = "slider", UIMin = 0, UIMax = 100 },
	Radius = 10,
	Zorro = {}
	}
from lua, Table["@"].UImin

i know it costs a table for the attributes, but in my case that's wearable (you could have a metatable returning {} for nodes with no attribs).

Adrian