[Top][All Lists]

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

Re: [Enigma-devel] Lua API

From: Andreas Lochmann
Subject: Re: [Enigma-devel] Lua API
Date: Wed, 24 Oct 2007 16:50:40 +0200
User-agent: IceDove (X11/20070607)


Ronald Lamprecht schrieb:
Consecutive naming of objects (building object groups)

  wo[pos] = {"st_chess", color = 0, name="Atrax#"}

For each call of the line above the new object will be named with a unique number appended after the "#" giving "Atrax#1", "Atrax#2", "Atrax#3", ...
What happens if I set "Atrax#2" directly and then create "Atrax#"?

And, if I create "Atrax#1" and "Atrax#2", then delete "Atrax#1" and
create "Atrax#" again, which will be the new name?

Can I access a group like a lua-table, like in:
 for j, v in pairs(no["Atrax#"]) do

"Atrax#" uses *unique* numbers appended to the name. If "Atrax#2" already exists this number/name will not be reused. If "Atrax#1" gets deleted and further "Atrax#" objects will be created the name of "Atrax#1" will be reassigned to the first new object.
Ah, okay. So, when there are "Atrax#1" to "Atrax#5", and "Atrax#2" is removed, then after deletion there will be "Atrax#1" to "Atrax#4", with the last objects being renamed? I.e., I can't be sure that "Atrax#3" is always the same object?

Is it neccessary to switch from "openclose" to "open_close" etc?

It is not necessary to switch. All namings of classes, attributes, messages and functions in the draft are preliminary and subject of common aggreement.

For all messages that toggle objects between two states like onoff, openclose,... we will introduce an additional common messages "toggle". This allows sending this most common message to groups mixed up of different objects.
We already have "trigger", which is used to toggle many objects ... ?

What does it mean to "toggle a fourswitch"?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]