Code: Select all
obj = {
id = Layout:GetNewID(0),
class = "button",
icon = #AISSICON,
name = base:ucFirst(obj.class)
toggle = False,
shorthelp = "button-shorthelp",
node = base:GetRightChars(obj.id,"-") .. "-node",
ckey = "",
contextmenu = 0,
weight = 100,
disabled = False,
hidden = False,
}
Having already tried the self or even this keyword I wonder if there is any other way to declare 'name' and 'node' conveniently inside the obj table? I suspect the answer is no meaning I will have to do the assignment outside the table.