Content

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

Usage details:

  • The arguments must be of integer type. There is no decimal point for arguments.
  • Arguments are separated by colon.
  • If only one argument is given, the argument will be transferred as end value. The loop will start from one to end value with step of 1 (or -1 if end value is lower than one).
  • If two arguments are given, the first argument will be transferred to the start value and the second one to the end value. If the start value is lower than the end value the loop will have a step value of 1. If the start value is higher than the end value the loop will have a step value of -1.
  • If three arguments are given, the arguments will be transferred to start, end and step values respectively. The sign of the step value will be modified based on the comparison of start and end value.
  • If the step value is bigger than the difference between the start and end values, the callback will only return the start value
  • Be careful for the syntax when using another callback as argument. For example: $(enum:$(max_registrations)) or $(enum:$(set:vol_speaker_mic))


Here are some argument examples:

ArgumentResult
5|1|2|3|4|5|
-5|1|0|-1|-2|-3|-4|-5|
1:8|1|2|3|4|5|6|7|8|
1:-3|1|0|-1|-2|-3|
4:-1|4|3|2|1|0|-1|
1:8:2|1|3|5|7|
1:-8:-2|1|-1|-3|-5|-7|
1:-8:2|1|-1|-3|-5|-7|
-8:1:-2|-8|-6|-4|-2|0|
-8:1:3|-8|-5|-2|-1|
-8:1:11|-8|
$(max_registrations)|1|2|3|4|5|6|7|8|9|10|11|12|


Example code:

Code Block
languagexml
<SnomIPPhoneMenu>
	<repeat values="$(enum:4)" token="|__TOKEN__|">
		<MenuItem name="__TOKEN__"></MenuItem>
	</repeat>
</SnomIPPhoneMenu>


Result:

Image Added


Include Page
Howto Footer - uni-en
Howto Footer - uni-en

Content by Label
showLabelsfalse
max50
spacesPW
showSpacefalse
sorttitle
typepage
cqllabel = "xml-minibrowser" and label = "callbacks" and type = "page"
labelsdect dect-multicell

Sv translation
languagede

Details zur Verwendung:

  • Die Argumente müssen vom Typ Integer sein. Es sind keine "Dezimalpunkte" für Argumente zulässig.
  • Argumente werden durch Doppelpunkt getrennt.
  • Wenn nur ein Argument angegeben wird, wird das Argument als Endwert übergeben. Die Schleife beginnt von eins bis zum Endwert mit einem Schritt von 1 (oder -1, wenn der Endwert kleiner als eins ist).
  • Wenn zwei Argumente angegeben werden, wird das erste Argument als Startwert und das zweite Argument als Endwert übergeben. Wenn der Startwert kleiner als der Endwert ist, hat die Schleife einen Schrittwert von 1. Wenn der Startwert größer als der Endwert ist, hat die Schleife einen Schrittwert von -1.
  • Wenn drei Argumente angegeben werden, werden die Argumente jeweils in Start-, End- und Schrittwert übertragen. Das Vorzeichen des Schrittwerts wird anhand des Vergleichs von Start- und Endwert geändert.
  • Wenn der Schrittwert größer ist als die Differenz zwischen Start- und Endwert, gibt der Callback nur den Startwert zurück
  • Achten Sie auf die Syntax, wenn Sie einen anderen Callback als Argument verwenden. Zum Beispiel: $(enum:$(max_registrations)) oder $(enum:$(set:vol_speaker_mic))


Hier sind einige Beispiele für Argumente:

ArgumentResult
5|1|2|3|4|5|
-5|1|0|-1|-2|-3|-4|-5|
1:8|1|2|3|4|5|6|7|8|
1:-3|1|0|-1|-2|-3|
4:-1|4|3|2|1|0|-1|
1:8:2|1|3|5|7|
1:-8:-2|1|-1|-3|-5|-7|
1:-8:2|1|-1|-3|-5|-7|
-8:1:-2|-8|-6|-4|-2|0|
-8:1:3|-8|-5|-2|-1|
-8:1:11|-8|
$(max_registrations)|1|2|3|4|5|6|7|8|9|10|11|12|


Beispiel-Code:

Code Block
languagexml
<SnomIPPhoneMenu>
	<repeat values="$(enum:4)" token="|__TOKEN__|">
		<MenuItem name="__TOKEN__"></MenuItem>
	</repeat>
</SnomIPPhoneMenu>


Ergebnis:

Image Added


Include Page
Howto Footer - de
Howto Footer - de

Content by Label
showLabelsfalse
max50
spacesPW
showSpacefalse
sorttitle
typepage
cqllabel = "xml-minibrowser" and label = "callbacks" and type = "page"
labelsdect dect-multicell