Method: WinWindow#recurse_each_child
- Defined in:
- lib/winwindow.rb
#recurse_each_child(options = {}) ⇒ Object
iterates over each child recursively, yielding a WinWindow object for each child.
raises a WinWindow::NotExistsError if the window does not exist, or a WinWindow::SystemError if a System Error errors.
use #children_recursive to get an Enumerable object.
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 |
# File 'lib/winwindow.rb', line 1090 def recurse_each_child(={}) =(, :rescue_enum_child_windows => true) ycomb do |recurse| proc do |win_window| yield win_window begin win_window.each_child do |child_window| recurse.call child_window end rescue SystemError raise unless [:rescue_enum_child_windows] && $!.function=='EnumChildWindows' end end end.call(self) end |