[squeak-dev] The Trunk: MorphicExtras-ct.302.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Dec 9 14:11:42 UTC 2021
Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/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
|