Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2057.mcz
==================== Summary ====================
Name: Morphic-ct.2057
Author: ct
Time: 26 November 2022, 1:50:40.467518 pm
UUID: 0bc53b37-9fd5-9643-8be1-722f0c6fd475
Ancestors: Morphic-ct.2056
Prevents pluggable buttons without a menu from acting on yellow-click. Why did we never notice this earlier? Yellow-click is for menus only ...
=============== Diff against Morphic-ct.2056 ===============
Item was changed:
----- Method: PluggableButtonMorph>>mouseUp: (in category 'event handling') -----
mouseUp: evt
+ evt yellowButtonChanged ifTrue: [^ super mouseUp: evt].
self updateFillStyle: evt.
(self containsPoint: evt cursorPoint)
ifTrue: [self performAction].!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2060.mcz
==================== Summary ====================
Name: Morphic-ct.2060
Author: ct
Time: 10 January 2023, 7:54:33.802506 pm
UUID: d1d3453c-34cf-444e-b978-93b4e70fcd56
Ancestors: Morphic-ct.2059
Preserves selection in TextMorph when changing the text style.
=============== Diff against Morphic-ct.2059 ===============
Item was changed:
----- Method: TextMorph>>textStyle: (in category 'accessing') -----
textStyle: aTextStyle
"Change the receiver's set of fonts to aTextStyle. You can access those fonts via the TextFontChange text attribute. If you want to enfore a specific font face or point size, use #font: instead. NOTE THAT you must provide either a freshly created instance of TextStyle or a copy of an existing one. NEVER use, for example, TextStyle class >> #default directly. Also see senders and implementors of #asNewTextStyle."
+ | previousSelection |
textStyle := aTextStyle.
+ previousSelection := self selectionInterval.
+ self releaseParagraph; changed.
+ previousSelection ifNotNil: [self selectionInterval: previousSelection].!
- self releaseParagraph; changed.!
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.484.mcz
==================== Summary ====================
Name: Compiler-eem.484
Author: eem
Time: 10 January 2023, 12:42:03.339564 pm
UUID: f98aa13d-19cf-4f6a-8bd6-31a0429c0d15
Ancestors: Compiler-eem.483
Fix an aliasing bug in the Decompiler that could cause it to enter an infinite loop decompiling conditionals. The copy used to decompile a full block must partially reinitialize to avoid aliasing lastJumpPc.
=============== Diff against Compiler-eem.483 ===============
Item was added:
+ ----- Method: Decompiler>>initializeCopy (in category 'control') -----
+ initializeCopy
+ lastJumpPc := lastReturnPc := exit := limit := nil.
+ stack := OrderedCollection new.
+ caseExits := OrderedCollection new.
+ lastJumpIfPcStack := OrderedCollection new.
+ !
Item was changed:
----- Method: Decompiler>>interpretNextInstructionFor: (in category 'private') -----
interpretNextInstructionFor: client
+ | varNames |
+ "Change false here (& edit statementsTo:) to trace all state in Transcript, printing pcs as relative to method initialPC."
- | code varNames |
-
- "Change false here will trace all state in Transcript."
true ifTrue: [^super interpretNextInstructionFor: client].
varNames := self class allInstVarNames.
+ Transcript crtab. self printPCRelative: pc on: Transcript.
+ Transcript space; nextPut: $<.
+ (self method at: pc) printOn: Transcript base: 16.
+ Transcript nextPut: $>; cr.
- code := (self method at: pc) radix: 16.
- Transcript cr; cr; print: pc; space; nextPutAll: '<' , code, '>'.
(varNames indexOf: 'stack') to: varNames size do:
+ [:i | | name |
+ name := varNames at: i.
+ self printInstVarNamed: name
+ at: i
+ on: Transcript
+ asPc: (#('pc' 'lastPc' 'exit' 'caseExits' 'lastJumpPc' 'lastReturnPc' 'limit' 'lastJumpIfPcStack') includes: name)].
- [:i |
- i <= 10 ifTrue: [Transcript cr] ifFalse: [Transcript space; space].
- Transcript nextPutAll: (varNames at: i); nextPutAll: ': '; print: (self instVarAt: i)].
Transcript flush.
^super interpretNextInstructionFor: client!
Item was added:
+ ----- Method: Decompiler>>printInstVarNamed:at:on:asPc: (in category 'private') -----
+ printInstVarNamed: ivName at: index on: aStream asPc: isPC
+
+ | value |
+ aStream tab; nextPutAll: ivName; nextPutAll: ': '.
+ value := self instVarAt: index.
+ isPC
+ ifTrue:
+ [value isCollection
+ ifTrue: [value do: [:v| self printPCRelative: v on: aStream. aStream space]]
+ ifFalse: [self printPCRelative: value on: aStream. aStream space]]
+ ifFalse:
+ [value printOn: aStream].
+ aStream cr!
Item was added:
+ ----- Method: Decompiler>>printPCRelative:on: (in category 'private') -----
+ printPCRelative: value on: aStream
+ value
+ ifNil: [value printOn: aStream]
+ ifNotNil:
+ [value < method initialPC
+ ifTrue: [value printOn: aStream]
+ ifFalse: [aStream nextPut: $+; print: value - method initialPC]]!
Item was changed:
----- Method: Decompiler>>pushFullClosure:numCopied: (in category 'instruction decoding') -----
pushFullClosure: aCompiledBlock numCopied: numCopied
| copiedValues |
copiedValues := ((1 to: numCopied) collect: [:ign| stack removeLast]) reversed.
+ stack addLast: (self shallowCopy initializeCopy doClosureCopy: aCompiledBlock copiedValues: copiedValues)!
- stack addLast: (self shallowCopy doClosureCopy: aCompiledBlock copiedValues: copiedValues)!
Item was changed:
----- Method: Decompiler>>statementsTo: (in category 'control') -----
statementsTo: end
"Decompile the method from pc up to end and return an array of
expressions. If at run time this block will leave a value on the stack,
set hasValue to true. If the block ends with a jump or return, set exit
to the destination of the jump, or the end of the method; otherwise, set
exit = end. Leave pc = end."
+ | encoderClass blockPos stackPos localLastPC initialPC |
+ initialPC := pc.
- | encoderClass blockPos stackPos localLastPC |
encoderClass := method encoderClass.
blockPos := statements size.
stackPos := stack size.
[pc < end]
whileTrue:
+ [lastPc := localLastPC := pc. limit := end. "for performs"
+ "for logging use the first form"
+ false
+ ifTrue: [self interpretNextInstructionFor: self]
+ ifFalse: [encoderClass interpretNextInstructionFor: self in: self]].
+ "If there is an additional item on the stack, it will be the value of this block."
- [lastPc := localLastPC := pc. limit := end. "for performs"
- "If you want instrumentation replace the following statement with this one,
- and edit the implementation:
- self interpretNextInstructionFor: self"
- encoderClass interpretNextInstructionFor: self in: self].
- "If there is an additional item on the stack, it will be the value
- of this block."
(hasValue := stack size > stackPos)
ifTrue:
[statements addLast: stack removeLast].
lastJumpPc = lastPc ifFalse: [exit := pc].
^self popTo: blockPos!
Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2059.mcz
==================== Summary ====================
Name: Morphic-ct.2059
Author: ct
Time: 10 January 2023, 7:53:24.619506 pm
UUID: 1290c367-ee35-e941-8b6f-293da41799d7
Ancestors: Morphic-mt.2057
Fixes documentation example for FillInTheBlankMorph class>>#requestPassword:initialAnswer:centerAt:inWorld:onCancelReturn:acceptOnCR:.
=============== Diff against Morphic-mt.2057 ===============
Item was changed:
----- Method: FillInTheBlankMorph class>>requestPassword:initialAnswer:centerAt:inWorld:onCancelReturn:acceptOnCR: (in category 'instance creation') -----
requestPassword: queryString initialAnswer: defaultAnswer centerAt: aPoint inWorld: aWorld onCancelReturn: returnOnCancel acceptOnCR: acceptBoolean
"Create an instance of me whose question is queryString with the given initial answer. Invoke it centered at the given point, and answer the string the user accepts. If the user cancels, answer returnOnCancel."
"FillInTheBlankMorph
+ requestPassword: 'Type something, then type CR.'
- request: 'Type something, then type CR.'
initialAnswer: 'yo ho ho!!'
+ centerAt: Display center
+ inWorld: self currentWorld
+ onCancelReturn: nil
+ acceptOnCR: true"
- centerAt: Display center"
| aFillInTheBlankMorph |
aFillInTheBlankMorph := self new
setPasswordQuery: queryString
initialAnswer: defaultAnswer
answerHeight: 50
acceptOnCR: acceptBoolean.
aFillInTheBlankMorph createAcceptButton
action: [aFillInTheBlankMorph textPane accept].
aFillInTheBlankMorph createCancelButton
action: [aFillInTheBlankMorph closeDialog: returnOnCancel].
aFillInTheBlankMorph preferredPosition: aPoint.
^ aFillInTheBlankMorph getUserResponse!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2057.mcz
==================== Summary ====================
Name: Morphic-mt.2057
Author: mt
Time: 9 January 2023, 11:00:54.890325 am
UUID: f093a34d-1306-2f44-89ca-f90c796f94c4
Ancestors: Morphic-ct.2056
Fixes two issues with Trascript:
1. "World Menu > Open... > transcript" should always count open transcripts
2. Menu item "Tools > Transcript" must not bind Transcript global but use Smalltalk>>#at: lookup.
The second bug occurred the moment we executed initialization code for new morphic projects to immediately render a preview thumbnail.
Note that I am still not in favor of executing code of a new project in the scope of the current project due to process management, globals, and other stuff. Let's keep an eye on this.
See
http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-December/222795…
I will backport this to Squeak 6.0.
=============== Diff against Morphic-ct.2056 ===============
Item was changed:
----- Method: TheWorldMainDockingBar>>transcriptMenuItemOn: (in category 'submenu - tools') -----
transcriptMenuItemOn: menu
menu addItem: [ :item |
item
contents: 'Transcript' translated;
help: 'Open the Transcript' translated;
icon: (self colorIcon: Transcript windowColorToUse);
+ target: [ (Smalltalk at: #Transcript) open ];
+ selector: #value ].!
- target: Transcript;
- selector: #open ]!
Item was changed:
----- Method: TheWorldMenu>>openTranscript (in category 'commands') -----
openTranscript
+ Transcript open.!
- Transcript openLabel: 'Transcript'!
Item was changed:
+ (PackageInfo named: 'Morphic') postscript: 'TheWorldMainDockingBar updateInstances. "Fix ''Tools > Transcript'' to make it late-bound."'!
- (PackageInfo named: 'Morphic') postscript: 'TheWorldMainDockingBar updateInstances. "Updates menu for Help > Contributing to Squeak"'!