David T. Lewis uploaded a new version of 39Deprecated to project The Trunk:
http://source.squeak.org/trunk/39Deprecated-dtl.21.mcz
==================== Summary ====================
Name: 39Deprecated-dtl.21
Author: dtl
Time: 20 September 2017, 11:20:48.035778 am
UUID: 01265807-b56f-4830-84a4-5bfbdcf3f4aa
Ancestors: 39Deprecated-fbs.20
Revert the last update because deprecated methods in this package should not be removed, instead the entire package may be excluded from a newer image release.
=============== Diff against 39Deprecated-fbs.20 ===============
Item was added:
+ ----- Method: SharedQueue2>>flush (in category '*39Deprecated') -----
+ flush
+ self deprecated: 'use removeAll'.
+ ^self removeAll!
Item was added:
+ ----- Method: SharedQueue2>>flushAllSuchThat: (in category '*39Deprecated') -----
+ flushAllSuchThat: aBlock
+ self deprecated: 'use removeAllSuchThat:'.
+
+ ^self removeAllSuchThat: aBlock!
David T. Lewis uploaded a new version of 39Deprecated to project The Trunk:
http://source.squeak.org/trunk/39Deprecated-fbs.20.mcz
==================== Summary ====================
Name: 39Deprecated-fbs.20
Author: fbs
Time: 25 July 2012, 9:42:16.56 pm
UUID: b22c5338-3200-4545-89bc-3f75c07e39af
Ancestors: 39Deprecated-ar.19
These methods are deprecated, and I can find no uses in the base image.
=============== Diff against 39Deprecated-ar.19 ===============
Item was removed:
- ----- Method: SharedQueue2>>flush (in category '*39Deprecated') -----
- flush
- self deprecated: 'use removeAll'.
- ^self removeAll!
Item was removed:
- ----- Method: SharedQueue2>>flushAllSuchThat: (in category '*39Deprecated') -----
- flushAllSuchThat: aBlock
- self deprecated: 'use removeAllSuchThat:'.
-
- ^self removeAllSuchThat: aBlock!
tim Rowledge uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tpr.306.mcz
==================== Summary ====================
Name: EToys-tpr.306
Author: tpr
Time: 19 September 2017, 7:02:48.372056 pm
UUID: 5091afdd-f34a-4314-953b-485a827d930e
Ancestors: EToys-eem.305
Fix hint & help windows for Cipher & Crostic
=============== Diff against EToys-eem.305 ===============
Item was changed:
----- Method: CipherPanel>>showHelpWindow (in category 'menu') -----
showHelpWindow
+ ((PluggableTextMorph new setText: 'The Cipher Panel displays an encrypted message. The encryption is a simple substitution code; each letter of the alphabet has been changed to a different one.
- ((StringHolder new contents: 'The Cipher Panel displays an encrypted message. The encryption is a simple substitution code; each letter of the alphabet has been changed to a different one.
You can solve the cipher by clicking above any letter in the message, and typing the letter you think it should be. The Cipher Panel automatically makes the same substitution anywhere else that letter occurs in the encoded message.
+ If you are having trouble, you can use the command menu to ''show cipher hints''. That will display how many of each letter occurs, which is often a help in solving ciphers.' translated )
- If you are having trouble, you can use the command menu to ''show cipher hints''. That will display how many of each letter occurs, which is often a help in solving ciphers.' translated)
embeddedInMorphicWindowLabeled: 'About the Cipher Panel' translated)
setWindowColor: (Color
r: 1.0
g: 0.6
b: 0.0);
openInWorld: self world extent: 389 @ 209!
Item was changed:
----- Method: CipherPanel>>showHintsWindow (in category 'menu') -----
showHintsWindow
+ ((PluggableTextMorph new setText: 'Most bodies of english text follow a general pattern of letter usage. The following are the most common letters, in approximate order of frequency:
- ((StringHolder new contents: 'Most bodies of english text follow a general pattern of letter usage. The following are the most common letters, in approximate order of frequency:
E T A O N I R S H
The following are the most common digraphs:
EN ER RE NT TH ON IN
The message you are trying to decode has the following specific statistics:' translated , self cipherStats , '
Good luck!!' translated)
embeddedInMorphicWindowLabeled: 'Some Useful Statistics' translated)
setWindowColor: (Color
r: 1.0
g: 0.6
b: 0.0);
openInWorld: self world extent: 318 @ 326!
Item was changed:
----- Method: CrosticPanel>>showHelpWindow (in category 'menu') -----
showHelpWindow
+ ((PluggableTextMorph new setText: 'The Crostic Panel presents an acrostic puzzle for solution. As you type in answers for the clues, the letters also get entered in the text of the hidden quote. Conversely, as you guess words in the quote, those letters will fill in missing places in your answers. In addition, the first letters of all the answers together form the author''s name and title of the work from which the quote is taken.
- ((StringHolder new contents: 'The Crostic Panel presents an acrostic puzzle for solution. As you type in answers for the clues, the letters also get entered in the text of the hidden quote. Conversely, as you guess words in the quote, those letters will fill in missing places in your answers. In addition, the first letters of all the answers together form the author''s name and title of the work from which the quote is taken.
If you wish to make up other acrostic puzzles, follow the obvious file format in the sampleFile method. If you wish to print an acrostic to work it on paper, then change the oldStyle method to return true, and it will properly cross-index all the cells.
Have fun.' translated)
embeddedInMorphicWindowLabeled: 'About the Crostic Panel' translated)
setWindowColor: (Color
r: 1.0
g: 0.6
b: 0.0);
openInWorld: self world extent: 409 @ 207!
Item was changed:
----- Method: CrosticPanel>>showHintsWindow (in category 'menu') -----
showHintsWindow
| hints |
(self confirm: 'As hints, you will be given the five longest answers.
Do you really want to do this?' translated)
ifFalse: [^ self].
hints := (answers sorted: [:x :y | x size > y size]) first: 5.
+ ((PluggableTextMorph new setText: 'The five longest answers are...
- ((StringHolder new contents: 'The five longest answers are...
' translated
, (String
streamContents: [:strm |
hints
do: [:hint | strm cr;
nextPutAll: (hint
collect: [:i | quote at: i])].
strm cr; cr]) , 'Good luck!!' translated)
embeddedInMorphicWindowLabeled: 'Crostic Hints' translated)
setWindowColor: (Color
r: 1.0
g: 0.6
b: 0.0);
openInWorld: self world extent: 198 @ 154!
tim Rowledge uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.1349.mcz
==================== Summary ====================
Name: Morphic-tpr.1349
Author: tpr
Time: 19 September 2017, 6:17:46.121858 pm
UUID: 81de60d2-86b3-405d-9a20-80b41eff2ec5
Ancestors: Morphic-tpr.1348
Some small fixes for the ScorePlayer - the sliders for speed/volume/moving-through-piano-roll and the indinvidual track volume/stereo position need increasing in height in order to work.
We still have a very strange problem caused by the change in selecting-from-a-list circa august 2016. When trying to choose a new instrument for a track we now use a list chooser dialog that appears to fervently keep a grip on the hand focus. To see the possible culprit, look at versions of MorphicUIManager>>#chooseFrom:lines:title: and revert back to the march 15 2010 version.
=============== Diff against Morphic-tpr.1348 ===============
Item was changed:
----- Method: ScorePlayerMorph>>panAndVolControlsFor: (in category 'layout') -----
panAndVolControlsFor: trackIndex
| volSlider panSlider c r middleLine pianoRollColor |
pianoRollColor := (Color wheel: scorePlayer score tracks size) at: trackIndex.
volSlider := SimpleSliderMorph new
color: color;
sliderColor: pianoRollColor;
+ extent: 101@6;
- extent: 101@2;
target: scorePlayer;
arguments: (Array with: trackIndex);
actionSelector: #volumeForTrack:put:;
minVal: 0.0;
maxVal: 1.0;
adjustToValue: (scorePlayer volumeForTrack: trackIndex).
panSlider := SimpleSliderMorph new
color: color;
sliderColor: pianoRollColor;
+ extent: 101@6;
- extent: 101@2;
target: scorePlayer;
arguments: (Array with: trackIndex);
actionSelector: #panForTrack:put:;
minVal: 0.0;
maxVal: 1.0;
adjustToValue: (scorePlayer panForTrack: trackIndex).
c := AlignmentMorph newColumn
color: color;
layoutInset: 0;
wrapCentering: #center; cellPositioning: #topCenter;
hResizing: #spaceFill;
vResizing: #shrinkWrap.
middleLine := Morph new "center indicator for pan slider"
color: (Color r: 0.4 g: 0.4 b: 0.4);
extent: 1@(panSlider height - 4);
position: panSlider center x@(panSlider top + 2).
panSlider addMorphBack: middleLine.
r := self makeRow.
r addMorphBack: (StringMorph contents: '0').
r addMorphBack: volSlider.
r addMorphBack: (StringMorph contents: '10').
c addMorphBack: r.
r := self makeRow.
r addMorphBack: (StringMorph contents: 'L' translated).
r addMorphBack: panSlider.
r addMorphBack: (StringMorph contents: 'R' translated).
c addMorphBack: r.
^ c
!
Item was changed:
----- Method: ScorePlayerMorph>>rateControl (in category 'layout') -----
rateControl
| rateSlider middleLine r |
rateSlider := SimpleSliderMorph new
color: color;
sliderColor: Color gray;
+ extent: 180@6;
- extent: 180@2;
target: self;
actionSelector: #setLogRate:;
minVal: -1.0;
maxVal: 1.0;
adjustToValue: 0.0.
middleLine := Morph new "center indicator for pan slider"
color: (Color r: 0.4 g: 0.4 b: 0.4);
extent: 1@(rateSlider height - 4);
position: rateSlider center x@(rateSlider top + 2).
rateSlider addMorphBack: middleLine.
r := self makeRow
hResizing: #shrinkWrap;
vResizing: #rigid;
height: 24.
r addMorphBack: (StringMorph contents: 'slow ' translated).
r addMorphBack: rateSlider.
r addMorphBack: (StringMorph contents: ' fast' translated).
^ r
!
Item was changed:
----- Method: ScorePlayerMorph>>scrollControl (in category 'layout') -----
scrollControl
| r |
scrollSlider := SimpleSliderMorph new
color: color;
sliderColor: Color gray;
+ extent: 360@6;
- extent: 360@2;
target: scorePlayer;
actionSelector: #positionInScore:;
adjustToValue: scorePlayer positionInScore.
r := self makeRow
hResizing: #shrinkWrap;
vResizing: #rigid;
height: 24.
r addMorphBack: (StringMorph contents: 'start ' translated).
r addMorphBack: scrollSlider.
r addMorphBack: (StringMorph contents: ' end' translated).
^ r
!
Item was changed:
----- Method: ScorePlayerMorph>>trackControlsFor: (in category 'layout') -----
trackControlsFor: trackIndex
| r |
r := self makeRow
+ hResizing: #spaceFill;
- hResizing: #shrinkWrap;
vResizing: #shrinkWrap.
r addMorphBack: (self trackNumAndMuteButtonFor: trackIndex).
r addMorphBack: (Morph new extent: 10@5; color: color). "spacer"
r addMorphBack: (self panAndVolControlsFor: trackIndex).
^ r
!
Item was changed:
----- Method: ScorePlayerMorph>>trackNumAndMuteButtonFor: (in category 'layout') -----
trackNumAndMuteButtonFor: trackIndex
| muteButton instSelector pianoRollColor r |
muteButton := SimpleSwitchMorph new
onColor: (Color r: 1.0 g: 0.6 b: 0.6);
offColor: color;
color: color;
label: 'Mute' translated;
target: scorePlayer;
actionSelector: #mutedForTrack:put:;
arguments: (Array with: trackIndex).
instSelector := PopUpChoiceMorph new
extent: 95@14;
contentsClipped: 'oboe1';
target: self;
actionSelector: #atTrack:from:selectInstrument:;
getItemsSelector: #instrumentChoicesForTrack:;
getItemsArgs: (Array with: trackIndex).
instSelector arguments:
(Array with: trackIndex with: instSelector).
instrumentSelector at: trackIndex put: instSelector.
"select track color using same color list as PianoRollScoreMorph"
pianoRollColor := (Color wheel: scorePlayer score tracks size) at: trackIndex.
r := self makeRow
+ hResizing: #spaceFill;
- hResizing: #rigid;
vResizing: #spaceFill;
extent: 70@10.
r addMorphBack:
((StringMorph
contents: trackIndex printString
font: (TextStyle default fontOfSize: 24)) color: pianoRollColor).
trackIndex < 10
ifTrue: [r addMorphBack: (Morph new color: color; extent: 19@8)] "spacer"
ifFalse: [r addMorphBack: (Morph new color: color; extent: 8@8)]. "spacer"
r addMorphBack:
(StringMorph new
extent: 140@14;
contentsClipped: (scorePlayer infoForTrack: trackIndex)).
r addMorphBack: (Morph new color: color; extent: 8@8). "spacer"
r addMorphBack: instSelector.
r addMorphBack: (AlignmentMorph newRow color: color). "spacer"
r addMorphBack: muteButton.
^ r
!
Item was changed:
----- Method: ScorePlayerMorph>>volumeControl (in category 'layout') -----
volumeControl
| volumeSlider r |
volumeSlider := SimpleSliderMorph new
color: color;
sliderColor: Color gray;
+ extent: 80@6;
- extent: 80@2;
target: scorePlayer;
actionSelector: #overallVolume:;
adjustToValue: scorePlayer overallVolume.
r := self makeRow
hResizing: #shrinkWrap;
vResizing: #rigid;
height: 24.
r addMorphBack: (StringMorph contents: 'soft ' translated).
r addMorphBack: volumeSlider.
r addMorphBack: (StringMorph contents: ' loud' translated).
^ r
!
tim Rowledge uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-tpr.962.mcz
==================== Summary ====================
Name: System-tpr.962
Author: tpr
Time: 18 September 2017, 4:45:22.01173 pm
UUID: e1c54891-6fa2-45fd-9acb-58c76815aa62
Ancestors: System-dtl.961
Add and expand some comments that should help to explain UserInterfaceTheme for future readers
=============== Diff against System-dtl.961 ===============
Item was changed:
----- Method: UserInterfaceTheme>>doesNotUnderstand: (in category 'lookup') -----
+ doesNotUnderstand: aMessage
+ "In order to be able to use a UserInterfaceTheme as a container of fairly arbitrary properties whilst making it seem like we are sending regular messages as a way of accessing those properties we can handle the dNU: and check the not understood message name against our property list. This is clever, devious, interesting and may confuse users until they get to see an explanation like this"
+ "Answer nil or a value for the property specified by aMessage's #selector. Searching for the property proceeds by
+ a) searching my dictionary for a key made up of an Association with a key of the class of the 'client' and a value of the message name. For example SimpleButtonMorph->borderColor
+ b) searching again for a key made from the superclass(es) of the client - e.g. RectangleMorph->borderColor and then if required BorderedMorph->borderColor etc.
+ c) if there is a linked theme, search it in the same manner.
+
+ As an extreme example, consider a basic theme with a linked theme specifically for buttons.
+ mySimpleButtonMorph borderColor
+ would search the basic theme for SimpleButtonMorph->borderColor, the superclass equivalents as in b) above, then search the linked theme for SimpleButtonMorph->borderColor and, we hope, find something meaningful"
- doesNotUnderstand: aMessage
- "Answer whether I have, or inherit, a value for the visual-attribute specified by aMessage's #selector."
aMessage numArgs > 0 ifTrue: [^ super doesNotUnderstand: aMessage].
scope isEmpty ifTrue: [^ super doesNotUnderstand: aMessage].
^ [self get: scope top class -> aMessage selector]
ensure: [scope pop]!
Item was changed:
----- Method: UserInterfaceTheme>>get: (in category 'private') -----
get: keyObject
+ "keyObject is intended to be an Association. We have two lookup strategies: 1) along the superclass chain *of the client*, 2) via a linked theme. Evaluate the result because there can be message sends stored or blocks."
- "keyObject is intended to be an Association. We have two lookup strategies: 1) along the superclass chain, 2) via a linke theme. Evaluate the result because there can be message sends stored or blocks."
| k |
properties
at: keyObject
ifPresent: [:prop | ^ prop value].
keyObject isVariableBinding "simple key objects"
ifFalse: [^ self getViaLink: keyObject].
k := keyObject key.
(self getViaSuperclasses: keyObject)
ifNotNil: [:prop | ^ prop].
keyObject key: k. "restore"
^ self getViaLink: keyObject!
Item was changed:
----- Method: UserInterfaceTheme>>getViaLink: (in category 'private') -----
getViaLink: keyObject
+ "keyObject is intended to be an Association.
+ If there is a linked theme, see if it has the relevant property available"
- "keyObject is intended to be an Association"
^ next ifNotNil: [next get: keyObject]!
Item was changed:
----- Method: UserInterfaceTheme>>getViaSuperclasses: (in category 'private') -----
getViaSuperclasses: keyObject
+ "keyObject is intended to be an Association.
+ Find the superclass of the key of the keyObject (which will initially be the client's class) and make a new keyObject using that and the original message name, then try searching for that."
- "keyObject is intended to be an Association"
"We know we're the only referencer of keyObject. Update it rather than create new ones, for performance reasons."
keyObject key: keyObject key superclass.
keyObject key ifNil: [^ nil].
properties
at: keyObject
ifPresent: [:prop | ^ prop value].
^ self getViaSuperclasses: keyObject!
Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-mt.383.mcz
==================== Summary ====================
Name: Tests-mt.383
Author: mt
Time: 18 September 2017, 11:43:21.93578 am
UUID: a6f43f48-58a8-774e-8ad4-3b102f1fda9d
Ancestors: Tests-mt.382
Adds and fixes tests considering that current UI themes do not have to be registered such as in test code.
=============== Diff against Tests-mt.382 ===============
Item was changed:
----- Method: UserInterfaceThemeTest>>test27ScopeIntegrity (in category 'tests') -----
test27ScopeIntegrity
"If application code manages to use Object >> #userInterfaceTheme without invoking the DNU dispatch directly afterwards, the theme's scope might get inconsistent. Even though this should usually never happen, check for it to be sure."
| issues |
issues := OrderedCollection new.
UserInterfaceTheme allThemes do: [:uit |
(uit instVarNamed: #scope) isEmpty ifFalse: [issues add: uit]].
+ UserInterfaceTheme current in: [:uit |
+ (UserInterfaceTheme allThemes includes: uit)
+ ifFalse: [(uit instVarNamed: #scope) isEmpty ifFalse: [issues add: uit]]].
self assert: issues isEmpty description: 'Some user interface themes have an inconsistent scope state, which can interfere with GC.'.!
Item was added:
+ ----- Method: UserInterfaceThemeTest>>test28DanglingTheme (in category 'tests') -----
+ test28DanglingTheme
+
+ self
+ assert: (UserInterfaceTheme allThemes includes: UserInterfaceTheme current)
+ description: 'The current user interface theme is not registered.'.!