[squeak-dev] The Inbox: MorphicExtras-ct.302.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Nov 13 02:03:55 UTC 2021


A new version of MorphicExtras was added to project The Inbox:
http://source.squeak.org/inbox/MorphicExtras-ct.302.mcz

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

Name: MorphicExtras-ct.302
Author: ct
Time: 13 November 2021, 3:03:51.706577 am
UUID: b396ae80-41e5-8f4d-8733-66b442a89bd9
Ancestors: MorphicExtras-mt.300

Adds a menu item to FrameRateMorph for editing the update interval. Also corrects type hint for this variable.

=============== Diff against MorphicExtras-mt.300 ===============

Item was changed:
  StringMorph subclass: #FrameRateMorph
+ 	instanceVariableNames: 'updateInterval lastDisplayTime framesSinceLastDisplay mSecsPerFrame framesPerSec'
- 	instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay updateInterval mSecsPerFrame framesPerSec'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'MorphicExtras-Demo'!

Item was added:
+ ----- Method: FrameRateMorph>>addCustomMenuItems:hand: (in category 'menu') -----
+ addCustomMenuItems: aMenu hand: aHandMorph
+ 
+ 	super addCustomMenuItems: aMenu hand: aHandMorph.
+ 	
+ 	aMenu add: 'set update interval...' translated action: #editUpdateInterval.!

Item was added:
+ ----- Method: FrameRateMorph>>editUpdateInterval (in category 'menu') -----
+ editUpdateInterval
+ 
+ 	| old new |
+ 	old := self updateInterval.
+ 	new := Project uiManager request: 'edit update interval' translated initialAnswer: old asString.
+ 	new isEmptyOrNil ifTrue: [^ false].
+ 	
+ 	self updateInterval: (old class readFromString: new).
+ 	^ true!

Item was changed:
  ----- Method: FrameRateMorph>>updateInterval: (in category 'accessing') -----
+ updateInterval: aDuration
- updateInterval: aNumber
  
+ 	updateInterval := aDuration!
- 	updateInterval := aNumber!



More information about the Squeak-dev mailing list