I think that we have (or had?) a utility in the image for displaying input
events as they are delivered to the image. I cannot find it in the image,
can someone please remind me what it was?
Thanks,
Dave
Chris Muller uploaded a new version of WebClient-HTTP to project The Trunk:
http://source.squeak.org/trunk/WebClient-HTTP-cmm.4.mcz
==================== Summary ====================
Name: WebClient-HTTP-cmm.4
Author: cmm
Time: 20 November 2015, 5:30:31.892 pm
UUID: 8f2d17a2-99b0-4216-8808-5d3276f15ae0
Ancestors: WebClient-HTTP-cmm.3
Support the 'args' variable in HTTPSocket class>>#httpGet:args:user:passwd:.
This fixes the in-image 'mc history' and origin functions for methods and classes.
=============== Diff against WebClient-HTTP-cmm.3 ===============
Item was changed:
----- Method: HTTPSocket class>>httpGet:args:user:passwd: (in category '*webclient-http') -----
httpGet: url args: args user: user passwd: passwd
"Upload the contents of the stream to a file on the server.
WARNING: This method will send a basic auth header proactively.
This is necessary to avoid breaking MC and SqueakSource since SS does not
return a 401 when accessing a private (global no access) repository."
| urlString xhdrs client resp progress |
+ "Normalize the url and append args"
- "Normalize the url"
urlString := (Url absoluteFromText: url) asString.
+ args ifNotNil: [
+ urlString := urlString, (self argString: args)
+ ].
"Some raw extra headers which historically have been added"
xhdrs := HTTPProxyCredentials,
HTTPBlabEmail. "may be empty"
client := WebClient new.
client username: user; password: passwd.
^[resp := client httpGet: urlString do:[:req|
"HACK: Proactively send a basic auth header.
See comment above."
req headerAt: 'Authorization' put: 'Basic ', (user, ':', passwd) base64Encoded.
"Accept anything"
req addHeader: 'Accept' value: '*/*'.
"Add the additional headers"
(WebUtils readHeadersFrom: xhdrs readStream)
do:[:assoc| req addHeader: assoc key value: assoc value]].
progress := [:total :amount|
(HTTPProgress new) total: total; amount: amount; signal: 'Downloading...'
].
"Simulate old HTTPSocket return behavior"
(resp code between: 200 and: 299)
ifTrue:[^(RWBinaryOrTextStream with: (resp contentWithProgress: progress)) reset]
ifFalse:[resp asString, resp content].
] ensure:[client destroy].
!
A new version of Traits was added to project The Inbox:
http://source.squeak.org/inbox/Traits-pre.307.mcz
==================== Summary ====================
Name: Traits-pre.307
Author: pre
Time: 20 November 2015, 2:58:26.562 pm
UUID: f0955b2d-775c-4862-85b9-5d6e616cd2e4
Ancestors: Traits-eem.306
This fixes http://bugs.squeak.org/view.php?id=7767 which is about the - and @ operator of Trait compositions ignoring brackets. This implementation uses the normal left to right evaluation order of Smalltalk to avoid confusions about the way trait composition expressions are evaluated.
=============== Diff against Traits-eem.306 ===============
Item was changed:
----- Method: TraitAlias>>printOn: (in category 'operations') -----
printOn: s
"Answer the trait composition string (used for class definitions)"
+ s nextPutAll: '('.
s nextPutAll: subject asString.
s nextPutAll: ' @ {'.
aliases do:[:assoc| s print: assoc] separatedBy:[s nextPutAll:'. '].
s nextPutAll: '}'.
+ s nextPutAll: ')'.!
- !
Item was changed:
----- Method: TraitComposition>>- (in category 'converting') -----
- anArray
- "the modifier operators #@ and #- bind stronger than +.
- Thus, #@ or #- sent to a sum will only affect the most right summand"
+ self updateTraits: (self traitsCollect: [:aTrait | aTrait - anArray ])!
- self addLast: (self removeLast - anArray)!
Item was changed:
----- Method: TraitComposition>>@ (in category 'converting') -----
@ anArrayOfAssociations
+
+ self updateTraits: (self traitsCollect: [:aTrait | aTrait @ anArrayOfAssociations ])!
- "the modifier operators #@ and #- bind stronger than +.
- Thus, #@ or #- sent to a sum will only affect the most right summand"
-
- self addLast: (self removeLast @ anArrayOfAssociations)!
Item was added:
+ ----- Method: TraitComposition>>traitsCollect: (in category 'accessing') -----
+ traitsCollect: aBlock
+ ^self collect: [:each| each traitsDo: aBlock]!
Item was changed:
----- Method: TraitComposition>>traitsDo: (in category 'accessing') -----
traitsDo: aBlock
+ ^self do: [:each| each traitsDo: aBlock]!
- ^self do:[:each| each traitsDo: aBlock]!
Item was added:
+ ----- Method: TraitComposition>>updateTraits: (in category 'converting') -----
+ updateTraits: aCollection
+
+ self
+ removeAll;
+ addAll: aCollection!
Item was changed:
----- Method: TraitExclusion>>printOn: (in category 'composition') -----
printOn: aStream
"Answer the trait composition string (used for class definitions)"
+ aStream nextPutAll: '('.
aStream nextPutAll: subject asString.
aStream nextPutAll: ' - {'.
exclusions asArray sort do:[:exc| aStream store: exc] separatedBy:[aStream nextPutAll: '. '].
+ aStream nextPutAll: '}'.
+ aStream nextPutAll: ')'.!
- aStream nextPutAll: '}'.!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1049.mcz
==================== Summary ====================
Name: Morphic-mt.1049
Author: mt
Time: 20 November 2015, 12:03:39.524 pm
UUID: 5e8ed364-933c-4412-a21c-f9de5a0eead2
Ancestors: Morphic-kfr.1048
Fixes a bug with text selection and scrolling text boxes that have no soft line breaks.
=============== Diff against Morphic-kfr.1048 ===============
Item was changed:
----- Method: PluggableTextMorph>>scrollSelectionIntoView: (in category 'editor access') -----
scrollSelectionIntoView: event
+ "Scroll my text into view. Due to line composition mechanism, we must never use the right of a character block because the lines last character block right value always comes from a global container and is *not* line specific."
+
- "Scroll my text into view if necessary and return true, else return false"
- | selRects rectToTest transform cpHere |
selectionInterval := textMorph editor selectionInterval.
+
+ textMorph editor hasSelection
+ ifFalse: [self scrollToShow: (textMorph editor startBlock withWidth: 1)]
+ ifTrue: [
+ self scrollToShow: (textMorph editor startBlock topLeft corner: textMorph editor stopBlock bottomLeft).
+ self scrollToShow: (textMorph editor pointBlock withWidth: 1). "Ensure text cursor visibility."].
+
- selRects := textMorph paragraph selectionRects.
- selRects isEmpty ifTrue: [^ false].
- rectToTest := selRects reduce: [:r1 :r2 | r1 quickMerge: r2].
- transform := scroller transformFrom: self.
- (event notNil and: [event anyButtonPressed]) ifTrue: "Check for autoscroll"
- [cpHere := transform localPointToGlobal: event cursorPoint.
- cpHere y <= self top
- ifTrue: [rectToTest := selRects first topLeft extent: 2@2]
- ifFalse: [cpHere y >= self bottom
- ifTrue: [rectToTest := selRects last bottomRight extent: 2@2]
- ifFalse: [^ false]]].
- self scrollToShow: rectToTest.
- self scrollToShow: textMorph editor pointBlock. "Ensure text cursor visibility."
^ true!
Item was changed:
----- Method: PluggableTextMorph>>setSelection: (in category 'model access') -----
setSelection: sel
selectionInterval := sel.
textMorph editor selectFrom: sel first to: sel last.
+ self scrollSelectionIntoView.!
- self scrollSelectionIntoView ifFalse: [scroller changed].!
Item was changed:
----- Method: TextMorph>>container (in category 'geometry') -----
container
"Return the container for composing this text. There are four cases:
1. container is specified as, eg, an arbitrary shape,
2. container is specified as the bound rectangle, because
this morph is linked to others,
3. container is nil, and wrap is true -- grow downward as necessary,
+ 4. container is nil, and wrap is false -- grow in 2D as necessary."
- 4. container is nil, and wrap is false -- grow in 2D as nexessary."
container ifNil:
[successor ifNotNil: [^ self compositionRectangle].
+ wrapFlag ifTrue: [^ self compositionRectangle withHeight: self maximumContainerExtent y].
+ ^ self compositionRectangle topLeft extent: self maximumContainerExtent].
- wrapFlag ifTrue: [^ self compositionRectangle withHeight: 9999999].
- ^ self compositionRectangle topLeft extent: 9999999@9999999].
^ container!
Item was added:
+ ----- Method: TextMorph>>maximumContainerExtent (in category 'geometry') -----
+ maximumContainerExtent
+ "For text composition. Returns the maximum area for text to be composed."
+
+ ^ 9999999@9999999!