enumerate

enumerate(block)

Repeat to call do handler of given script object with each item in the XList as an argument.

The parameter “block” is a script object which must have a do handler.The do handler must accept two arguments.

  on do(an_item, sender)
    -- do something
	return true
  end do

The do handler must return true or false. When the do handler return false, the processing enumerate handler is stoped immediately.

Calling this method will cause to reset the interator counter of the target.

Parameters