Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.266.mcz
==================== Summary ====================
Name: EToys-tfel.266
Author: tfel
Time: 30 September 2016, 11:38:29.998245 am
UUID: 984ecc63-aae1-7445-b5ae-8b0f1a83be61
Ancestors: EToys-tfel.265
for now, always compile scripts in the global environment.
=============== Diff against EToys-tfel.265 ===============
Item was changed:
----- Method: ScriptEncoder>>init:context:notifying: (in category 'as yet unclassified') -----
init: class context: ctxt notifying: parser
super
init: (CompilationCue
source: nil
context: ctxt
receiver: nil
class: class
+ environment: Smalltalk
- environment: class environment
requestor: nil)
notifying: parser!
Tim Felgentreff uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-tfel.200.mcz
==================== Summary ====================
Name: MorphicExtras-tfel.200
Author: tfel
Time: 30 September 2016, 10:41:47.794046 am
UUID: 7928bc41-4f8c-164d-b1e2-716d4bdb204e
Ancestors: MorphicExtras-tfel.199
remove cached thumbnails from book morph pages before saving them
=============== Diff against MorphicExtras-tfel.199 ===============
Item was changed:
----- Method: BookMorph>>releaseCachedState (in category 'caching') -----
releaseCachedState
"Release the cached state of all my pages."
super releaseCachedState.
self removeProperty: #allText. "the cache for text search"
pages do: [:page |
+ page == currentPage ifFalse: [page fullReleaseCachedState].
+ page removeProperty: #cachedThumbnail].!
- page == currentPage ifFalse: [page fullReleaseCachedState]].
- !
Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.264.mcz
==================== Summary ====================
Name: EToys-tfel.264
Author: tfel
Time: 29 September 2016, 4:53:52.684594 pm
UUID: 9d15add9-79e2-4777-9f0b-d2acefe870ed
Ancestors: EToys-tfel.263
renamed sendLog to sendReport
=============== Diff against EToys-tfel.263 ===============
Item was removed:
- ----- Method: PreDebugWindow>>sendLog (in category 'as yet unclassified') -----
- sendLog
- model storeLog; sendLog.!
Item was added:
+ ----- Method: PreDebugWindow>>sendReport (in category 'as yet unclassified') -----
+ sendReport
+ model storeLog; sendReport.!
Tim Felgentreff uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-tfel.729.mcz
==================== Summary ====================
Name: Tools-tfel.729
Author: tfel
Time: 29 September 2016, 4:47:02.790594 pm
UUID: 9b62c088-e527-4b8b-aa12-58517f3ec58e
Ancestors: Tools-tfel.728
When the system is set to eToyFriendly, the debugger previously offered to store the log of the error in a text file. To help with keeping track of problems for the people who use Etoys, add some facility so we can offer to send error reports to a server set in a preference.
=============== Diff against Tools-tfel.728 ===============
Item was changed:
CodeHolder subclass: #Debugger
instanceVariableNames: 'interruptedProcess interruptedController contextStack contextStackIndex contextStackList receiverInspector contextVariablesInspector externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject errorWasInUIProcess labelString message untilExpression'
+ classVariableNames: 'ContextStackKeystrokes ErrorRecursion ErrorReportServer InterruptUIProcessIfBlockedOnErrorInBackgroundProcess WantsAnnotationPane'
- classVariableNames: 'ContextStackKeystrokes ErrorRecursion InterruptUIProcessIfBlockedOnErrorInBackgroundProcess WantsAnnotationPane'
poolDictionaries: ''
category: 'Tools-Debugger'!
!Debugger commentStamp: '<historical>' prior: 0!
I represent the machine state at the time of an interrupted process. I also represent a query path into the state of the process. The debugger is typically viewed through a window that views the stack of suspended contexts, the code for, and execution point in, the currently selected message, and inspectors on both the receiver of the currently selected message, and the variables in the current context.
Special note on recursive errors:
Some errors affect Squeak's ability to present a debugger. This is normally an unrecoverable situation. However, if such an error occurs in an isolation layer, Squeak will attempt to exit from the isolation layer and then present a debugger. Here is the chain of events in such a recovery.
* A recursive error is detected.
* The current project is queried for an isolationHead
* Changes in the isolationHead are revoked
* The parent project of isolated project is returned to
* The debugger is opened there and execution resumes.
If the user closes that debugger, execution continues in the outer project and layer. If, after repairing some damage, the user proceeds from the debugger, then the isolationHead is re-invoked, the failed project is re-entered, and execution resumes in that world. !
Item was added:
+ ----- Method: Debugger class>>errorReportServer (in category 'preferences') -----
+ errorReportServer
+ <preference: 'Server to send error reports to'
+ category: 'debug'
+ description: 'When eToyFriendly is enabled, the debugger offers to send an error report to the developers of the system. This variable controls where this error report is sent to.'
+ type: #String>
+ ^ErrorReportServer ifNil: ['']!
Item was added:
+ ----- Method: Debugger class>>errorReportServer: (in category 'preferences') -----
+ errorReportServer: aString
+
+ ErrorReportServer := aString!
Item was changed:
----- Method: Debugger>>preDebugButtonQuads (in category 'initialize') -----
preDebugButtonQuads
^Preferences eToyFriendly
ifTrue: [
{
+ {'Send error report' translated. #sendReport. #blue. 'send a report of the encountered problem to the Squeak developers' translated}.
- {'Store log' translated. #storeLog. #blue. 'write a log of the encountered problem' translated}.
{'Abandon' translated. #abandon. #black. 'abandon this execution by closing this window' translated}.
{'Debug' translated. #debug. #red. 'bring up a debugger' translated}}]
ifFalse: [
{
{'Proceed' translated. #proceed. #blue. 'continue execution' translated}.
{'Abandon' translated. #abandon. #black. 'abandon this execution by closing this window' translated}.
{'Debug' translated. #debug. #red. 'bring up a debugger' translated}}]
!
Item was changed:
----- Method: Debugger>>preDebugMessageString (in category 'toolbuilder') -----
preDebugMessageString
+ ^ message ifNil: [
+ String streamContents: [:s |
+ s nextPutAll: 'An error has occurred, sorry!! You could send the Squeak developers an error report or just hit ''Abandon''.
+
+ In the error report, there is no personal information, only information that we can use to investigate the error. If you decide to send us the error report, it will include the following text:
+
+ ' translated.
+ [s nextPutAll: self contextStackTop printString; cr.
+ self contextStackTop errorReportOn: s] on: Error do: [s nextPutAll: 'no text, there was an error creating the error report' translated]]].!
- ^ message ifNil: ['An error has occurred; you should probably just hit ''abandon''. Sorry!!' translated].!
Item was added:
+ ----- Method: Debugger>>sendReport (in category 'notifier menu') -----
+ sendReport
+ [| errorReport |
+ errorReport := String streamContents: [:s |
+ s nextPutAll: self contextStackTop printString; cr.
+ self contextStackTop errorReportOn: s].
+ (Smalltalk classNamed: #WebClient)
+ ifNotNil: [:wc |
+ wc
+ httpPost: self class errorReportServer
+ content: errorReport
+ type: 'text/plain']] on: Error do: ["nothing"].
+ self abandon.!
Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.263.mcz
==================== Summary ====================
Name: EToys-tfel.263
Author: tfel
Time: 29 September 2016, 4:07:37.715594 pm
UUID: 951255bb-c387-4df7-8044-181017752b52
Ancestors: EToys-tfel.262
- remove two obsolete methods
- forward sendLog to the Debugger
=============== Diff against EToys-tfel.262 ===============
Item was removed:
- ----- Method: FillInTheBlankMorph>>createQueryTextMorph: (in category '*Etoys-Squeakland-initialization') -----
- createQueryTextMorph: queryString
- "create the queryTextMorph"
- | r |
- r := TextMorph new newContents: queryString.
- r setNameTo: 'query' translated.
- r font: Preferences standardMenuFont.
- r releaseParagraphReally.
- r fillStyle: ScriptingSystem baseColor.
- r centered.
- r lock.
- r hResizing: #spaceFill.
- ^ r!
Item was removed:
- ----- Method: FillInTheBlankMorph>>createTextPaneAcceptBoolean: (in category '*Etoys-Squeakland-initialization') -----
- createTextPaneAcceptBoolean: acceptBoolean
- "create the textPane"
- | r |
- r := PluggableTextMorph
- on: self
- text: #response
- accept: #response:
- readSelection: #selectionInterval
- menu: #codePaneMenu:shifted:.
- r hResizing: #spaceFill;
- vResizing: #spaceFill.
- r borderWidth: 1.
- r borderColor: Preferences menuBorderColor.
- r hasUnacceptedEdits: true.
- r acceptOnCR: acceptBoolean.
- r setNameTo: 'textPane'.
- r font: Preferences standardMenuFont.
- r hideScrollBarsIndefinitely.
- r selectionInterval: nil.
- r selectAll.
- ^ r!
Item was added:
+ ----- Method: PreDebugWindow>>sendLog (in category 'as yet unclassified') -----
+ sendLog
+ model storeLog; sendLog.!
Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.262.mcz
==================== Summary ====================
Name: EToys-tfel.262
Author: tfel
Time: 29 September 2016, 2:13:27.526594 pm
UUID: ec1649f4-3c03-415c-89d4-504ffe9be9a1
Ancestors: EToys-tfel.261
remove a transcript show that was triggered often during compilation of kedama scripts
=============== Diff against EToys-tfel.261 ===============
Item was changed:
----- Method: KedamaAttributeEvaluator>>evaluateOccurence: (in category 'private') -----
evaluateOccurence: occurence
"pick the attribute from the occurence at parseNode."
"check the dependency for that occurence."
"if they are not evaluated, recursively call itself with new arguments."
"if all the values are evaluated, #perform: the registered method with these values."
| ret n args realArgs |
n := occurence node.
args := ReadStream on: (occurence dependencies collect: [:oc | oc value]).
realArgs := Array new: 0.
occurence inputSizes do: [:s |
s isCollection ifTrue: [
realArgs := realArgs copyWith: (args next: (s at: 1)).
] ifFalse: [
realArgs := realArgs copyWith: args next.
].
].
(n = parseTree and: [occurence selectedRule selector = #rcvr]) ifTrue: [
ret := receiver
] ifFalse: [
ret := n perform: occurence selectedRule selector withArguments: realArgs.
].
Debug == true ifTrue: [
Transcript show: n printString, ' ', occurence selectedRule selector, ' ', args printString, ' ', realArgs printString, ' ', ret printString; cr.
].
- ret ifNil: [Transcript show: occurence printString; cr].
occurence value: ret.
!
Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.261.mcz
==================== Summary ====================
Name: EToys-tfel.261
Author: tfel
Time: 29 September 2016, 2:00:18.299594 pm
UUID: b41c90b3-754a-452e-add4-3637e2be7a97
Ancestors: EToys-tfel.260
make ScriptableButtons hold on to their own action scripts, rather than their enclosing paste up morph. Otherwise the button action changes when I drop it in a different world!
=============== Diff against EToys-tfel.260 ===============
Item was removed:
- ----- Method: ButtonProperties>>editButtonsScript: (in category 'events') -----
- editButtonsScript: evt
- "The user has touched my Scriptor halo-handle. Bring up a Scriptor on the script of the button."
-
- | cardsPasteUp cardsPlayer anEditor scriptSelector |
-
- cardsPasteUp := self pasteUpMorph.
- (cardsPlayer := cardsPasteUp assuredPlayer) assureUniClass.
- scriptSelector := self figureOutScriptSelector.
- scriptSelector ifNil: [
- scriptSelector := cardsPasteUp scriptSelectorToTriggerFor: self.
- anEditor := cardsPlayer newTextualScriptorFor: scriptSelector.
- evt hand attachMorph: anEditor.
- ^self
- ].
-
- (cardsPlayer class includesSelector: scriptSelector) ifTrue: [
- anEditor := cardsPlayer scriptEditorFor: scriptSelector.
- evt hand attachMorph: anEditor.
- ^self
- ].
- "Method somehow got removed; I guess we start aftresh"
- scriptSelector := nil.
- ^ self editButtonsScript!
Item was removed:
- ----- Method: PasteUpMorph>>scriptSelectorToTriggerFor: (in category '*Etoys-viewing') -----
- scriptSelectorToTriggerFor: aButtonMorph
- "Answer a new selector which will bear the code for aButtonMorph in the receiver"
-
- | buttonName selectorName |
- buttonName := aButtonMorph externalName.
- selectorName := self assuredPlayer acceptableScriptNameFrom: buttonName forScriptCurrentlyNamed: nil.
-
- buttonName ~= selectorName ifTrue:
- [aButtonMorph setNameTo: selectorName].
- ^ selectorName!
Item was changed:
----- Method: ScriptableButton>>doButtonAction (in category 'button') -----
doButtonAction
"The user has pressed the button. Dispatch to the actual user script, if any."
scriptSelector ifNil: [^ super doButtonAction].
+ self player performScriptIfCan: scriptSelector!
- self pasteUpMorph player performScriptIfCan: scriptSelector!
Item was changed:
----- Method: ScriptableButton>>editButtonsScript (in category 'script') -----
editButtonsScript
"The user has touched my Scriptor halo-handle. Bring up a Scriptor on the script of the button."
+ | anEditor player |
+ (player := self assuredPlayer) assureUniClass.
- | cardsPasteUp cardsPlayer anEditor |
- cardsPasteUp := self pasteUpMorph.
- (cardsPlayer := cardsPasteUp assuredPlayer) assureUniClass.
anEditor := scriptSelector ifNil:
+ [scriptSelector := self scriptSelectorToTriggerForMe.
+ player newTextualScriptorFor: scriptSelector.
+ player scriptEditorFor: scriptSelector]
- [scriptSelector := cardsPasteUp scriptSelectorToTriggerFor: self.
- cardsPlayer newTextualScriptorFor: scriptSelector.
- cardsPlayer scriptEditorFor: scriptSelector
- ]
ifNotNil:
+ [(player class selectors includes: scriptSelector)
+ ifTrue: [player scriptEditorFor: scriptSelector]
- [(cardsPlayer class selectors includes: scriptSelector)
- ifTrue: [cardsPlayer scriptEditorFor: scriptSelector]
ifFalse:
["Method somehow got removed; I guess we start afresh"
-
scriptSelector := nil.
+ ^ self editButtonsScript]].
- ^self editButtonsScript]].
anEditor showingMethodPane ifTrue: [anEditor toggleWhetherShowingTiles].
self currentHand attachMorph: anEditor!
Item was added:
+ ----- Method: ScriptableButton>>scriptSelectorToTriggerForMe (in category 'accessing') -----
+ scriptSelectorToTriggerForMe
+ "Answer a new selector which will bear the code for myself"
+
+ | buttonName selectorName |
+ buttonName := self externalName.
+ selectorName := self assuredPlayer acceptableScriptNameFrom: buttonName forScriptCurrentlyNamed: nil.
+
+ buttonName ~= selectorName ifTrue:
+ [self setNameTo: selectorName].
+ ^ selectorName!