[squeak-dev] The Inbox: Morphic-laza.574.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Sep 15 09:17:36 UTC 2011


Alexander Lazarević uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-laza.574.mcz

==================== Summary ====================

Name: Morphic-laza.574
Author: laza
Time: 15 September 2011, 11:15:54.794 am
UUID: d6d493ea-178b-44ca-bb16-46345d84111d
Ancestors: Morphic-laza.573

Now with spiffy countdown on the selected button

UserDialogBoxMorph confirm: 'Yay! This is great!' timeout: 5

=============== Diff against Morphic-laza.573 ===============

Item was changed:
  AlignmentMorph subclass: #UserDialogBoxMorph
+ 	instanceVariableNames: 'titleMorph labelMorph buttonRow value selectedButton selectedButtonLabel cancelButton timeout autoCloseProcess'
- 	instanceVariableNames: 'titleMorph labelMorph buttonRow value selectedButton cancelButton timeout autoCloseProcess'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Morphic-Windows'!
  
  !UserDialogBoxMorph commentStamp: 'ar 12/11/2009 22:33' prior: 0!
  A DialogBoxMorph is Morph used in simple yes/no/confirm dialogs. Strongly modal.!

Item was changed:
  ----- Method: UserDialogBoxMorph>>autoCloseBlock (in category 'running') -----
  autoCloseBlock
  	^[
+ 		| start past |
+ 		start := Time totalSeconds.
+ 		selectedButtonLabel := selectedButton label.
+ 		[(past := Time totalSeconds - start) <= timeout] whileTrue: [
+ 			selectedButton label: selectedButtonLabel, ' (', (timeout - past) printString, ')'.
+ 			(Delay forSeconds: 1) wait].
- 		(Delay forSeconds: self timeout) wait.
  		selectedButton ifNotNil: [selectedButton performAction]
  	]!

Item was changed:
  ----- Method: UserDialogBoxMorph>>stopAutoClose (in category 'running') -----
  stopAutoClose
+ 	autoCloseProcess ifNotNil: [autoCloseProcess terminate].
+ 	selectedButtonLabel ifNotNil: [
+ 		selectedButton label: selectedButtonLabel.
+ 		selectedButtonLabel := nil]!
- 	autoCloseProcess ifNotNil: [autoCloseProcess terminate]!




More information about the Squeak-dev mailing list