[SVN] r6310

Chris Thomas chris at cjack.com
Thu Dec 7 15:40:15 UTC 2006


• Make the standard progress dialog native to TM (replacing the external CocoaDialog progress dialog). No changes to client code required.

• Support determinate progress bars.

• Support a cancel button.

You could previously get an indeterminate progress bar:

  TextMate.call_with_progress(:title =>'Now Testing',
          :summary => 'Starting Up...') do
	# do something
  end

But now you can do:

  TextMate.call_with_progress(:title =>'Now Testing',
			:summary => 'Starting Up...',
			:indeterminate => false,
			:cancel => lambda {puts "Canceled!"; exit 0} ) do |dialog|

    #....
    dialog.parameters = {'summary' => 'Loving the alien...','progressValue' => 30 }
    #...
    dialog.parameters = {'summary' => 'Eating the pie...','progressValue' => 60 }
    #...
    dialog.parameters = {'summary' => 'Vacuuming the rug...','progressValue' => 90 }
    #...
    dialog.parameters = {'summary' => 'Complete!','progressValue' => 100 }
    #...
  end

Changed:
U   trunk/Support/lib/progress.rb
A   trunk/Support/nibs/ProgressDialog.nib/
A   trunk/Support/nibs/ProgressDialog.nib/classes.nib
A   trunk/Support/nibs/ProgressDialog.nib/info.nib
A   trunk/Support/nibs/ProgressDialog.nib/keyedobjects.nib



More information about the textmate-dev mailing list