Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.781.mcz
==================== Summary ====================
Name: Collections-mt.781
Author: mt
Time: 26 January 2018, 7:41:59.694036 am
UUID: c0e03e0a-31fe-384d-bc46-71aff7946d0f
Ancestors: Collections-mt.780
For the ReleaseBuilder, adds setter for #characterLimit Transcript preference.
=============== Diff against Collections-mt.780 ===============
Item was added:
+ ----- Method: TranscriptStream class>>characterLimit: (in category 'preferences') -----
+ characterLimit: anInteger
+
+ CharacterLimit := anInteger.!
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.998.mcz
==================== Summary ====================
Name: System-dtl.998
Author: dtl
Time: 25 January 2018, 8:05:33.27544 pm
UUID: d20b1282-caaa-4e4f-8025-a85608b6345e
Ancestors: System-bf.997
Project>>dispatchTo:addPrefixAndSend:withArguments: no longer requires manual update of baseSelectors since System-bf.997. Update method comment accordingly.
=============== Diff against System-bf.997 ===============
Item was changed:
----- Method: Project>>dispatchTo:addPrefixAndSend:withArguments: (in category 'dispatching') -----
dispatchTo: requestor addPrefixAndSend: baseSelector withArguments: arguments
"Sender wants to perform a method with dependencies on the type of project.
Dispatch to an appropriate method for the current project.
- If additional base selectors are added for dispatching, the list of base selectors
- in Project class>>baseSelectors should be updated.
-
This method is a workaround for lack of proper ToolBuilder support in the sender,
and should be eliminated when possible (dtl Feb 2010)"
<hasLiteralTest: #isDispatchSelector:>
| selector |
selector := (self selectorPrefixForDispatch, baseSelector) asSymbol.
^ requestor perform: selector withArguments: arguments!
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-bf.997.mcz
==================== Summary ====================
Name: System-bf.997
Author: bf
Time: 25 January 2018, 4:56:35.380251 pm
UUID: 604954ca-0389-43c0-a5c7-4ddc8e613cc9
Ancestors: System-dtl.996
Simplify project dispatch selector detection. No hard-coded list. Almost as good.
=============== Diff against System-dtl.996 ===============
Item was removed:
- ----- Method: Project class>>baseSelectors (in category 'dispatching') -----
- baseSelectors
- "The list of known base selectors that may be dispatched to project specific
- implementations. For example, #OpenLabel:in: will be dispatched to #mvcOpenLabel:in:
- for its MVC specific implementation. Add new base selectors here if additional methods
- are added as targets of the dispatchTo:addPrefixAndSend:withArguments: mechanism."
-
- ^ {
- #StartUpLeftFlush .
- #StartUpWithCaption:icon:at:allowKeyboard: .
- #OpenLabel:in: .
- #Open: .
- #Open .
- #OpenOn:context:label:contents:fullView: .
- #ResumeProcess: .
- #OpenContext:label:contents:
- }
- !
Item was removed:
- ----- Method: Project class>>dispatchSelectors (in category 'dispatching') -----
- dispatchSelectors
- "All known targets of the dispatch mechanism"
-
- "Project dispatchSelectors"
-
- | selectors dispatchPrefixes |
- selectors := OrderedCollection new.
- dispatchPrefixes := Set withAll: (Project allSubclasses collect: [ :e | e basicNew selectorPrefixForDispatch ]).
- self baseSelectors do: [ :base |
- dispatchPrefixes do: [ :prefix |
- selectors add: (prefix, base) asSymbol ] ].
- ^ selectors
-
- !
Item was changed:
----- Method: Project class>>isDispatchSelector: (in category 'dispatching') -----
isDispatchSelector: aSelector
"In support of package modularity, some method selectors are generated based
on project type and dispatched to the appropriate implementation for that project.
For methods with these selectors, let dispatchTo:addPrefixAndSend:withArguments:
be found as a sender."
+ | dispatchPrefixes prefix otherSelector |
+ dispatchPrefixes := Project allSubclasses collect:
+ [:cls | cls basicNew selectorPrefixForDispatch].
+ "If it doesn't start with a recognized prefix, it's not dispatchable"
+ prefix := dispatchPrefixes detect: [:each | aSelector beginsWith: each]
+ ifNone: [^false].
+ "If a similar symbol exists for all other prefixes, it's likely dispatchable"
+ ^(dispatchPrefixes copyWithout: prefix)
+ allSatisfy: [:otherPrefix |
+ otherSelector := otherPrefix, (aSelector allButFirst: prefix size).
+ Symbol hasInterned: otherSelector ifTrue: [:s]]
-
- ^ self dispatchSelectors includes: aSelector.
!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1391.mcz
==================== Summary ====================
Name: Morphic-mt.1391
Author: mt
Time: 25 January 2018, 11:08:01.098657 am
UUID: b014edf4-b643-aa45-93da-314b58b16517
Ancestors: Morphic-mt.1390
Because of the changes in WorldState>>displayWorldSafely: to reduce the number of interactions and debuggers, remove the restoring loop in MorphicProject>>restore. It is not needed anymore and caused another bug when discarding an emergency evaluator.
=============== Diff against Morphic-mt.1390 ===============
Item was changed:
----- Method: MorphicProject>>restore (in category 'display') -----
restore
- "Display world safely. Catch all errors to avoid image freeze. We assume that the world will avoid drawing erroneous morphs twice"
+ world displayWorldSafely.!
- | finished |
- finished := false.
-
- [finished] whileFalse: [
- [world displayWorldSafely. finished := true]
- on: Error do: [:err | world fullRepaintNeeded]].
- !
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1390.mcz
==================== Summary ====================
Name: Morphic-mt.1390
Author: mt
Time: 25 January 2018, 9:52:54.634682 am
UUID: 9e8d30da-71db-904c-8e9f-3fd71c497ad9
Ancestors: Morphic-mt.1389
Fixes error recursion handling for Morphic's interactive debugger.
You can do-it this now in your workspace:
[1 halt] fork.
Processor yield.
2 halt.
=============== Diff against Morphic-mt.1389 ===============
Item was changed:
----- Method: Debugger class>>morphicOpenOn:context:label:contents:fullView: (in category '*Morphic-opening') -----
morphicOpenOn: process context: context label: title contents: contentsStringOrNil fullView: full
"Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger."
+
+ ErrorRecursionGuard critical: [
+
+ | errorWasInUIProcess debugger |
+ ErrorRecursion ifTrue: [
+ "self assert: process == Project current uiProcess -- DOCUMENTATION ONLY"
+ self clearErrorRecursion.
+ ^ Project current handleFatalDrawingError: title].
+
+ [ErrorRecursion not & Preferences logDebuggerStackToFile
+ ifTrue: [Smalltalk logSqueakError: title inContext: context]]
+ on: Error
+ do: [:ex | ex return: nil].
+
- ErrorRecursionGuard critical:
- [ | errorWasInUIProcess debugger |
- ErrorRecursion ifTrue:
- [ "self assert: process == Project current uiProcess -- DOCUMENTATION ONLY"
- ErrorRecursion := false.
- ^ Project current handleFatalDrawingError: title ].
- [ ErrorRecursion not & Preferences logDebuggerStackToFile ifTrue:
- [ Smalltalk
- logSqueakError: title
- inContext: context ] ]
- on: Error
- do: [ : ex | ex return: nil ].
- ErrorRecursion := true.
errorWasInUIProcess := Project current spawnNewProcessIfThisIsUI: process.
+
"Schedule debugging in deferred UI message because
+ 1) If process is the current UI process, it is already broken.
+ 2) If process is some other process, it must not execute UI code"
+ Project current addDeferredUIMessage: [
+ self setErrorRecursion.
+
+ debugger := self new process: process controller: nil context: context.
- 1) If process is the current UI process, it is already broken.
- 2) If process is some other process, it must not execute UI code"
- Project current addDeferredUIMessage:
- [ debugger := self new
- process: process
- controller: nil
- context: context.
full
+ ifTrue: [debugger openFullNoSuspendLabel: title]
+ ifFalse: [debugger openNotifierContents: contentsStringOrNil label: title].
- ifTrue: [ debugger openFullNoSuspendLabel: title ]
- ifFalse:
- [ debugger
- openNotifierContents: contentsStringOrNil
- label: title ].
debugger errorWasInUIProcess: errorWasInUIProcess.
+
"Try drawing the debugger tool at least once to avoid freeze."
Project current world displayWorldSafely.
+
+ self clearErrorRecursion]].
+
+ process suspend.!
- ErrorRecursion := false ]].
- process suspend !
Item was changed:
----- Method: WorldState>>displayWorldSafely: (in category 'update cycle') -----
displayWorldSafely: aWorld
"Update this world's display and keep track of errors during draw methods."
| finished errors previousClasses |
finished := false.
errors := nil.
[finished] whileFalse: [
[aWorld displayWorld. finished := true] on: Error do: [:ex |
"Handle a drawing error"
| err rcvr errCtx errMorph |
err := ex description.
rcvr := ex receiver.
errCtx := thisContext.
[
errCtx := errCtx sender.
"Search the sender chain to find the morph causing the problem"
[errCtx notNil and:[(errCtx receiver isMorph) not]]
whileTrue:[errCtx := errCtx sender].
"If we're at the root of the context chain then we have a fatal drawing problem"
errCtx ifNil:[^Project current handleFatalDrawingError: err].
errMorph := errCtx receiver.
"If the morph causing the problem has already the #drawError flag set,
then search for the next morph above in the caller chain."
errMorph hasProperty: #errorOnDraw
] whileTrue.
errMorph setProperty: #errorOnDraw toValue: true.
"Catch all errors, one for each receiver class."
errors ifNil: [errors := OrderedCollection new].
previousClasses ifNil: [previousClasses := IdentitySet new].
(previousClasses includes: rcvr class) ifFalse: [
previousClasses add: rcvr class.
errors add: (Process forContext: ex signalerContext copyStack priority: Processor activeProcess priority) -> err].
aWorld fullRepaintNeeded.
]].
"Open debuggers for all different errors found."
errors ifNotNil: [
+ Debugger setErrorRecursion.
+ errors do: [:ea |
- [errors do: [:ea |
(Debugger new process: ea key controller: nil context: ea key suspendedContext)
errorWasInUIProcess: Processor activeProcess = Project current uiProcess;
openNotifierContents: nil label: ea value].
"Try to draw the debuggers or else there will be no chance to escape from this catch-drawing-error loop."
+ ActiveWorld displayWorld.
+ Debugger clearErrorRecursion].!
- ActiveWorld displayWorld] on: Error do: [:ex | Project current handleFatalDrawingError: ex description] ].!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.794.mcz
==================== Summary ====================
Name: Tools-mt.794
Author: mt
Time: 25 January 2018, 9:48:23.38719 am
UUID: 479b2546-02dd-1748-b7ef-df974876abef
Ancestors: Tools-mt.793
Adds public interface to indicate error recursion. To be used in Morphic's drawing loop.
=============== Diff against Tools-mt.793 ===============
Item was added:
+ ----- Method: Debugger class>>clearErrorRecursion (in category 'error recursion') -----
+ clearErrorRecursion
+ ErrorRecursion := false.!
Item was added:
+ ----- Method: Debugger class>>setErrorRecursion (in category 'error recursion') -----
+ setErrorRecursion
+ ErrorRecursion := true.!