Okay, seems that I still can't figure it out.
This what was before:
confunc add_mail
{
call *node:root.maillist.mainBody.mails@createChild("mail<1>", "mailheader")
*node:root.maillist.mainBody.mails.mail<1>.header.index@integer = <1>
*node:root.maillist.mainBody.mails.mail<1>.header.headline@string = <2>
*node:root.maillist.mainBody.mails.mail<1>.icon@src = <3>
if ( <4> eq 0 ) {
*node:root.maillist.mainBody.mails.mail<1>.header@bgcolor = "0.56 0.81 0.76 0.6"
}
*node:root.maillist.mainBody.mails.mail<1>.header.date@string = <5>
}
and my interpretation:
add_mail = ufo.create_confunc(mailclient, "add_mail", nil)
add_mail.on_click = function(sender, index, headline, icon, state, date)
local mail = ufo.create_control(mails, "mailheader", "mail"..index, nil)
mail:child("header"):child("index"):set_value(index)
mail:child("header"):child("headline"):set_text(headline)
mail:child("header"):child("icon"):set_src(icon)
mail:child("header"):child("date"):set_text(date)
if (state == 0) then
mail:child("header"):set_backgroundcolor(0.56, 0.81, 0.76, 0.6)
end
end