Skip to content

Instantly share code, notes, and snippets.

@pjaspers
Created April 15, 2010 22:18
Show Gist options
  • Save pjaspers/367737 to your computer and use it in GitHub Desktop.
Save pjaspers/367737 to your computer and use it in GitHub Desktop.
def connection(connection, didSendBodyData:bytesWritten, totalBytesWritten:totalBytesWritten, totalBytesExpectedToWrite:totalBytesExpectedToWrite)
puts "Written: #{bytesWritten} TotalBytesWritten: #{totalBytesWritten} TotalBytesExpectedToWrite: #{totalBytesExpectedToWrite}"
puts "Double: #{totalBytesWritten / (totalBytesExpectedToWrite/100)}"
progress_bar.setDoubleValue(totalBytesWritten / (totalBytesExpectedToWrite/100))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment