ListIterator

Constructor

ListIterator <id> (Process list, Process action, <0|1>)

The last parameter is optional and specifies if the iteration must be done only when explicity activated (1) or also when the parent is activated (0). The default value is 1.

Action

When activated, this process iterates over all of the list's items from the first to the last. On each iteration it sets the action's data to the current item and activates the action.

Predefined children

None

Example


use core
use base

_action_
print_text (Component c)
%{
  TextProperty *t = (TextProperty*) c->get_data ();
  cout << "value: " << t->get_value () << endl;  
%}

_main_
Component root {
  List l {
    String s1 ("my text 1")
    String s2 ("my text 2")
    String s3 ("my text 3")
  }
  NativeAction print_action (print_text, 1)
  ListIterator iter (l, print_action, 0)
}

run root