From: Craig Williams Date: 2008-06-03T01:50:44+09:00 Subject: How to update text field contents during looping process I am running a loop over AppleScript files in a directory tree. Each time through the loop "osadecompiles" the script and adds the script text to an array. When it is through it populates a table. What I have been attempting to do is update a text field with the current iteration. I am using the following code but I have tried many variations. I have tried with and without the Thread. It *does* log to the console through each iteration just not the window. def update_run_count Thread.new do text = "Processing #{@c} of #{@file_count}" puts text @text_field.setStringValue(text) @text_field.setNeedsDisplay(true) @text_field.setTextColor(NSColor.redColor) end end Thanks, Craig -- Posted via http://www.ruby-forum.com/.