Chris Muller uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-cmm.717.mcz
==================== Summary ====================
Name: Kernel-cmm.717
Author: cmm
Time: 24 November 2012, 6:26:24.16 pm
UUID: 9f98e64f-c1da-4c6e-94ec-c07d48dd7a22
Ancestors: Kernel-nice.716
NumberParser>>error: signal a NumberParserError instead of Error.
=============== Diff against Kernel-nice.716 ===============
Item was added:
+ ----- Method: NumberParser>>error: (in category 'error') -----
+ error: aString
+ NumberParserError signal: aString!
Chris Muller uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-cmm.717.mcz
==================== Summary ====================
Name: Kernel-cmm.717
Author: cmm
Time: 24 November 2012, 6:26:24.16 pm
UUID: 9f98e64f-c1da-4c6e-94ec-c07d48dd7a22
Ancestors: Kernel-nice.716
NumberParser>>error: signal a NumberParserError instead of Error.
=============== Diff against Kernel-nice.716 ===============
Item was added:
+ ----- Method: NumberParser>>error: (in category 'error') -----
+ error: aString
+ NumberParserError signal: aString!
Chris Muller uploaded a new version of Exceptions to project The Trunk:
http://source.squeak.org/trunk/Exceptions-cmm.37.mcz
==================== Summary ====================
Name: Exceptions-cmm.37
Author: cmm
Time: 24 November 2012, 6:23:20.97 pm
UUID: 0c4792bb-f5fe-4205-b8b3-801a8f420eec
Ancestors: Exceptions-chc.36
Introduce NumberParserError so that errors parsing numbers via #asNumber can be discerned from other kinds of Errors.
=============== Diff against Exceptions-chc.36 ===============
Item was added:
+ Error subclass: #NumberParserError
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Exceptions-Kernel'!
Chris Muller uploaded a new version of Exceptions to project The Trunk:
http://source.squeak.org/trunk/Exceptions-cmm.37.mcz
==================== Summary ====================
Name: Exceptions-cmm.37
Author: cmm
Time: 24 November 2012, 6:23:20.97 pm
UUID: 0c4792bb-f5fe-4205-b8b3-801a8f420eec
Ancestors: Exceptions-chc.36
Introduce NumberParserError so that errors parsing numbers via #asNumber can be discerned from other kinds of Errors.
=============== Diff against Exceptions-chc.36 ===============
Item was added:
+ Error subclass: #NumberParserError
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Exceptions-Kernel'!
Chris Muller uploaded a new version of Exceptions to project The Trunk:
http://source.squeak.org/trunk/Exceptions-cmm.37.mcz
==================== Summary ====================
Name: Exceptions-cmm.37
Author: cmm
Time: 24 November 2012, 6:23:20.97 pm
UUID: 0c4792bb-f5fe-4205-b8b3-801a8f420eec
Ancestors: Exceptions-chc.36
Introduce NumberParserError so that errors parsing numbers via #asNumber can be discerned from other kinds of Errors.
=============== Diff against Exceptions-chc.36 ===============
Item was added:
+ Error subclass: #NumberParserError
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Exceptions-Kernel'!
Chris Muller uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cmm.429.mcz
==================== Summary ====================
Name: Tools-cmm.429
Author: cmm
Time: 24 November 2012, 6:19:36.512 pm
UUID: 50cb8cd0-5220-4ca3-96c1-0812ae6d0da8
Ancestors: Tools-eem.428
- Fix hot-key for removing a method from a MessageSet even if that method has already been deleted.
=============== Diff against Tools-eem.428 ===============
Item was changed:
----- Method: CodeHolder>>messageListKey:from: (in category 'message list menu') -----
messageListKey: aChar from: view
"Respond to a Command key. I am a model with a code pane, and I also
have a listView that has a list of methods. The view knows how to get
the list and selection."
-
| sel class |
aChar == $D ifTrue: [^ self toggleDiffing].
-
sel := self selectedMessageName.
aChar == $m ifTrue: "These next two put up a type in if no message selected"
[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self ].
aChar == $n ifTrue:
[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self ].
+ aChar == $d ifTrue: [^ self removeMessageFromBrowser].
-
"The following require a class selection"
(class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view].
aChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel].
aChar == $N ifTrue: [^ self browseClassRefs].
aChar == $i ifTrue: [^ self methodHierarchy].
aChar == $h ifTrue: [^ self classHierarchy].
aChar == $p ifTrue: [^ self browseFullProtocol].
aChar == $r ifTrue: [^ self browseVariableReferences].
aChar == $a ifTrue: [^ self browseVariableAssignments].
-
-
"The following require a method selection"
sel ifNotNil:
[aChar == $o ifTrue: [^ self fileOutMessage].
aChar == $c ifTrue: [^ self copySelector].
aChar == $v ifTrue: [^ self browseVersions].
aChar == $O ifTrue: [^ self openSingleMessageBrowser].
aChar == $x ifTrue: [^ self removeMessage].
- aChar == $d ifTrue: [^ self removeMessageFromBrowser].
-
(aChar == $C and: [self canShowMultipleMessageCategories])
ifTrue: [^ self showHomeCategory]].
-
^ self arrowKey: aChar from: view!
Chris Muller uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cmm.429.mcz
==================== Summary ====================
Name: Tools-cmm.429
Author: cmm
Time: 24 November 2012, 6:19:36.512 pm
UUID: 50cb8cd0-5220-4ca3-96c1-0812ae6d0da8
Ancestors: Tools-eem.428
- Fix hot-key for removing a method from a MessageSet even if that method has already been deleted.
=============== Diff against Tools-eem.428 ===============
Item was changed:
----- Method: CodeHolder>>messageListKey:from: (in category 'message list menu') -----
messageListKey: aChar from: view
"Respond to a Command key. I am a model with a code pane, and I also
have a listView that has a list of methods. The view knows how to get
the list and selection."
-
| sel class |
aChar == $D ifTrue: [^ self toggleDiffing].
-
sel := self selectedMessageName.
aChar == $m ifTrue: "These next two put up a type in if no message selected"
[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self ].
aChar == $n ifTrue:
[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self ].
+ aChar == $d ifTrue: [^ self removeMessageFromBrowser].
-
"The following require a class selection"
(class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view].
aChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel].
aChar == $N ifTrue: [^ self browseClassRefs].
aChar == $i ifTrue: [^ self methodHierarchy].
aChar == $h ifTrue: [^ self classHierarchy].
aChar == $p ifTrue: [^ self browseFullProtocol].
aChar == $r ifTrue: [^ self browseVariableReferences].
aChar == $a ifTrue: [^ self browseVariableAssignments].
-
-
"The following require a method selection"
sel ifNotNil:
[aChar == $o ifTrue: [^ self fileOutMessage].
aChar == $c ifTrue: [^ self copySelector].
aChar == $v ifTrue: [^ self browseVersions].
aChar == $O ifTrue: [^ self openSingleMessageBrowser].
aChar == $x ifTrue: [^ self removeMessage].
- aChar == $d ifTrue: [^ self removeMessageFromBrowser].
-
(aChar == $C and: [self canShowMultipleMessageCategories])
ifTrue: [^ self showHomeCategory]].
-
^ self arrowKey: aChar from: view!
Chris Muller uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cmm.429.mcz
==================== Summary ====================
Name: Tools-cmm.429
Author: cmm
Time: 24 November 2012, 6:19:36.512 pm
UUID: 50cb8cd0-5220-4ca3-96c1-0812ae6d0da8
Ancestors: Tools-eem.428
- Fix hot-key for removing a method from a MessageSet even if that method has already been deleted.
=============== Diff against Tools-eem.428 ===============
Item was changed:
----- Method: CodeHolder>>messageListKey:from: (in category 'message list menu') -----
messageListKey: aChar from: view
"Respond to a Command key. I am a model with a code pane, and I also
have a listView that has a list of methods. The view knows how to get
the list and selection."
-
| sel class |
aChar == $D ifTrue: [^ self toggleDiffing].
-
sel := self selectedMessageName.
aChar == $m ifTrue: "These next two put up a type in if no message selected"
[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllImplementorsOf: to: self ].
aChar == $n ifTrue:
[^ self useSelector: sel orGetSelectorAndSendQuery: #browseAllCallsOn: to: self ].
+ aChar == $d ifTrue: [^ self removeMessageFromBrowser].
-
"The following require a class selection"
(class := self selectedClassOrMetaClass) ifNil: [^ self arrowKey: aChar from: view].
aChar == $b ifTrue: [^ Browser fullOnClass: class selector: sel].
aChar == $N ifTrue: [^ self browseClassRefs].
aChar == $i ifTrue: [^ self methodHierarchy].
aChar == $h ifTrue: [^ self classHierarchy].
aChar == $p ifTrue: [^ self browseFullProtocol].
aChar == $r ifTrue: [^ self browseVariableReferences].
aChar == $a ifTrue: [^ self browseVariableAssignments].
-
-
"The following require a method selection"
sel ifNotNil:
[aChar == $o ifTrue: [^ self fileOutMessage].
aChar == $c ifTrue: [^ self copySelector].
aChar == $v ifTrue: [^ self browseVersions].
aChar == $O ifTrue: [^ self openSingleMessageBrowser].
aChar == $x ifTrue: [^ self removeMessage].
- aChar == $d ifTrue: [^ self removeMessageFromBrowser].
-
(aChar == $C and: [self canShowMultipleMessageCategories])
ifTrue: [^ self showHomeCategory]].
-
^ self arrowKey: aChar from: view!
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.428.mcz
==================== Summary ====================
Name: Tools-eem.428
Author: eem
Time: 15 November 2012, 12:59:12.101 pm
UUID: 5d9b5b4d-52fa-4489-8803-f4ad4c1e02b2
Ancestors: Tools-eem.427
Provide a run-until-expression facility for the debugger.
Thanks to Bob Arning and Bert Freudenberg for UI advice.
=============== Diff against Tools-eem.427 ===============
Item was changed:
CodeHolder subclass: #Debugger
+ instanceVariableNames: 'interruptedProcess interruptedController contextStack contextStackIndex contextStackList receiverInspector contextVariablesInspector externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject errorWasInUIProcess labelString message untilExpression'
- instanceVariableNames: 'interruptedProcess interruptedController contextStack contextStackIndex contextStackList receiverInspector contextVariablesInspector externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject errorWasInUIProcess labelString message'
classVariableNames: 'ContextStackKeystrokes ErrorRecursion InterruptUIProcessIfBlockedOnErrorInBackgroundProcess'
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 changed:
----- Method: Debugger>>codePaneMenu:shifted: (in category 'code pane menu') -----
codePaneMenu: aMenu shifted: shifted
+ aMenu
+ add: 'run to here' target: self selector: #runToSelection: argument: thisContext sender receiver selectionInterval;
+ add: 'run until...' target: self selector: #runUntil;
+ addLine.
- aMenu add: 'run to here' target: self selector: #runToSelection: argument: thisContext sender receiver selectionInterval.
- aMenu addLine.
super codePaneMenu: aMenu shifted: shifted.
^aMenu.!
Item was added:
+ ----- Method: Debugger>>runUntil (in category 'code pane menu') -----
+ runUntil
+ "Step until an expression evaluates to other than false, reporting an erroer if it doesn't evaluate to true.
+ Remember the expression in an inst var. If shift is pressed when the expression is supplied, don't update the UI.
+ If shift is pressed while stepping, stop stepping. Using a user interrupt to break out would be more natural
+ but Squeak currently doesn't provide a UserInterrupt expection. It should do."
+ | expression receiver context method value lastUpdate updateUI breakOnShift |
+ expression := UIManager default
+ request: 'run until expression is true (shift to disable ui update; shift to break).'
+ initialAnswer: (untilExpression ifNil: 'boolean expression').
+ (expression isNil or: [expression isEmpty]) ifTrue:
+ [^self].
+ updateUI := breakOnShift := Sensor shiftPressed not.
+ untilExpression := expression.
+ context := self selectedContext.
+ receiver := context receiver.
+ FakeClassPool adopt: receiver class.
+ method := receiver class evaluatorClass new
+ compiledMethodFor: untilExpression
+ in: context
+ to: receiver
+ notifying: nil
+ ifFail: [FakeClassPool adopt: nil. ^ #failedDoit]
+ logged: false.
+
+ lastUpdate := Time millisecondClockValue.
+ FakeClassPool adopt: nil.
+ [self selectedContext == context
+ and: [(value := receiver with: context executeMethod: method) == false]] whileTrue:
+ [self doStep.
+ Time millisecondClockValue - lastUpdate > 50 ifTrue:
+ [updateUI ifTrue: [World displayWorldSafely].
+ breakOnShift
+ ifTrue: [Sensor shiftPressed ifTrue: [^self]]
+ ifFalse: [Sensor shiftPressed ifFalse: [breakOnShift := true]].
+ lastUpdate := Time millisecondClockValue]].
+ (value ~~ false and: [value ~~ true]) ifTrue:
+ [UIManager default inform: 'expression ', (untilExpression contractTo: 40), ' answered ', (value printString contractTo: 20), '!!!!']!
Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.428.mcz
==================== Summary ====================
Name: Tools-eem.428
Author: eem
Time: 15 November 2012, 12:59:12.101 pm
UUID: 5d9b5b4d-52fa-4489-8803-f4ad4c1e02b2
Ancestors: Tools-eem.427
Provide a run-until-expression facility for the debugger.
Thanks to Bob Arning and Bert Freudenberg for UI advice.
=============== Diff against Tools-eem.427 ===============
Item was changed:
CodeHolder subclass: #Debugger
+ instanceVariableNames: 'interruptedProcess interruptedController contextStack contextStackIndex contextStackList receiverInspector contextVariablesInspector externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject errorWasInUIProcess labelString message untilExpression'
- instanceVariableNames: 'interruptedProcess interruptedController contextStack contextStackIndex contextStackList receiverInspector contextVariablesInspector externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject errorWasInUIProcess labelString message'
classVariableNames: 'ContextStackKeystrokes ErrorRecursion InterruptUIProcessIfBlockedOnErrorInBackgroundProcess'
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 changed:
----- Method: Debugger>>codePaneMenu:shifted: (in category 'code pane menu') -----
codePaneMenu: aMenu shifted: shifted
+ aMenu
+ add: 'run to here' target: self selector: #runToSelection: argument: thisContext sender receiver selectionInterval;
+ add: 'run until...' target: self selector: #runUntil;
+ addLine.
- aMenu add: 'run to here' target: self selector: #runToSelection: argument: thisContext sender receiver selectionInterval.
- aMenu addLine.
super codePaneMenu: aMenu shifted: shifted.
^aMenu.!
Item was added:
+ ----- Method: Debugger>>runUntil (in category 'code pane menu') -----
+ runUntil
+ "Step until an expression evaluates to other than false, reporting an erroer if it doesn't evaluate to true.
+ Remember the expression in an inst var. If shift is pressed when the expression is supplied, don't update the UI.
+ If shift is pressed while stepping, stop stepping. Using a user interrupt to break out would be more natural
+ but Squeak currently doesn't provide a UserInterrupt expection. It should do."
+ | expression receiver context method value lastUpdate updateUI breakOnShift |
+ expression := UIManager default
+ request: 'run until expression is true (shift to disable ui update; shift to break).'
+ initialAnswer: (untilExpression ifNil: 'boolean expression').
+ (expression isNil or: [expression isEmpty]) ifTrue:
+ [^self].
+ updateUI := breakOnShift := Sensor shiftPressed not.
+ untilExpression := expression.
+ context := self selectedContext.
+ receiver := context receiver.
+ FakeClassPool adopt: receiver class.
+ method := receiver class evaluatorClass new
+ compiledMethodFor: untilExpression
+ in: context
+ to: receiver
+ notifying: nil
+ ifFail: [FakeClassPool adopt: nil. ^ #failedDoit]
+ logged: false.
+
+ lastUpdate := Time millisecondClockValue.
+ FakeClassPool adopt: nil.
+ [self selectedContext == context
+ and: [(value := receiver with: context executeMethod: method) == false]] whileTrue:
+ [self doStep.
+ Time millisecondClockValue - lastUpdate > 50 ifTrue:
+ [updateUI ifTrue: [World displayWorldSafely].
+ breakOnShift
+ ifTrue: [Sensor shiftPressed ifTrue: [^self]]
+ ifFalse: [Sensor shiftPressed ifFalse: [breakOnShift := true]].
+ lastUpdate := Time millisecondClockValue]].
+ (value ~~ false and: [value ~~ true]) ifTrue:
+ [UIManager default inform: 'expression ', (untilExpression contractTo: 40), ' answered ', (value printString contractTo: 20), '!!!!']!