/ Published in: Ruby

This is an example of how to use the progressbar widget from Alexander Stigsen's new wxCocoaDialog, an open source port of CocoaDialog to Win32 using the ExWidgets toolkit. This is a companion project to his e Text Editor.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/env ruby cocoadialog = "#{ENV['TM_SUPPORT_PATH']}/bin/CocoaDialog" IO.popen("'#{cocoadialog}' progressbar --title 'Updating...'",'w') do |pbar| (1..100).each do |percent| pbar.puts "#{percent} #{percent}% Complete\n" sleep(1) if percent % 10 == 0 and percent < 100 end end
Comments
