Revision: 2266
Updated Code
at January 31, 2007 22:28 by gtcaz
Updated Code
#!/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
Revision: 2265
Updated Code
at January 31, 2007 22:26 by gtcaz
Updated Code
#!/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'.to_f) if percent % 10 == 0 end end
Revision: 2264
Updated Code
at January 30, 2007 18:45 by gtcaz
Updated Code
#!/usr/bin/env ruby cocoadialog = "#{ENV['TM_SUPPORT_PATH']}/bin/CocoaDialog.exe" IO.popen("'#{cocoadialog}' progressbar --title 'Updating...'",'w') do |pbar| (1..100).each do |percent| pbar.puts "#{percent} #{percent}% Complete\n" sleep('.2'.to_f) end end
Revision: 2263
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 27, 2007 11:02 by gtcaz
Initial Code
#!/usr/bin/env ruby cocoadialog = "#{ENV['TM_SUPPORT_PATH']}/bin/CocoaDialog.app/Contents/Win32/CocoaDialog.exe" IO.popen("'#{cocoadialog}' progressbar --title 'Updating...'",'w') do |pbar| (1..100).each do |percent| pbar.puts "#{percent} #{percent}% Complete\n" sleep('.2'.to_f) end end
Initial URL
Initial Description
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.
Initial Title
wxCocoaDialog progressbar example
Initial Tags
textmate
Initial Language
Ruby