Suppose you have a form that contains a bunch of spinboxes for measurements. You want to be able to set them all to zero with the click of a button.

function resetButton_onClick( )

   local obj 

   obj = form.first // First control in z-order 

   do 

      if obj.className == "SPINBOX" 

         obj.value := 0 

      endif 

      obj := obj.before // Next control in z-order 

   until obj == form.first // Until you get back to first control 

Compare this loop with the example for elements.