tim Rowledge uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-tpr.26.mcz
==================== Summary ====================
Name: TrueType-tpr.26
Author: tpr
Time: 3 September 2013, 4:59:10.251 pm
UUID: 964516e1-f994-408b-9cc1-0a5b7408ad3a
Ancestors: TrueType-fbs.25
Add some comments to a few important methods to, y'know, actually help readers understand WTF is going on.
Part of fixing Mantis-01781 7 years after it was reported.
=============== Diff against TrueType-fbs.25 ===============
Item was changed:
----- Method: MultiTTCFont>>glyphInfoOf:into: (in category 'as yet unclassified') -----
glyphInfoOf: char into: glyphInfoArray
+ "return glyph info for char; I may have cached info to work from"
-
| newForm |
self hasCached: char ifTrue: [:form :index |
self access: char at: index.
glyphInfoArray at: 1 put: form;
at: 2 put: 0;
at: 3 put: form width;
at: 4 put: (self ascentOf: char);
at: 5 put: self.
^ glyphInfoArray.
].
newForm := self computeForm: char.
self at: char put: newForm.
glyphInfoArray at: 1 put: newForm;
at: 2 put: 0;
at: 3 put: newForm width;
at: 4 put: (self ascentOf: char);
at: 5 put: self.
^ glyphInfoArray.
!
Item was changed:
----- Method: TTCFont>>glyphInfoOf:into: (in category 'private') -----
glyphInfoOf: aCharacter into: glyphInfoArray
+ "return the glyph info for aCharacter; if I don't have such a character, try my fallback font"
- "Answer the width of the argument as a character in the receiver."
| form |
(self hasGlyphOf: aCharacter) ifFalse: [
^ self fallbackFont glyphInfoOf: aCharacter into: glyphInfoArray.
].
form := self formOf: aCharacter.
glyphInfoArray at: 1 put: form;
at: 2 put: 0;
at: 3 put: form width;
at: 4 put: ascent "(self ascentOf: aCharacter)";
at: 5 put: self.
^ glyphInfoArray.
!
Item was changed:
----- Method: TTCFontSet>>glyphInfoOf:into: (in category 'private') -----
glyphInfoOf: aCharacter into: glyphInfoArray
+ "return glyph info for the character; it can get complicated."
-
| index f code |
+ "the leadingChar gives us an encoding. if that is outside the range of fonts in my fontArray, just return the default glyphInfo for a question-mark"
index := aCharacter leadingChar + 1.
fontArray size < index ifTrue: [^ self questionGlyphInfoInto: glyphInfoArray].
(f := fontArray at: index) ifNil: [^ self questionGlyphInfoInto: glyphInfoArray].
+ "if the actual character is not in the range supported by the chosen font, return that default question-mark info "
code := aCharacter charCode.
((code between: f minAscii and: f maxAscii) not) ifTrue: [
^ self questionGlyphInfoInto: glyphInfoArray.
].
+ "finally, we have an ok font and character to return glyph info about - note that the font may have other ideas. "
f glyphInfoOf: aCharacter into: glyphInfoArray.
glyphInfoArray at: 5 put: self.
^ glyphInfoArray.
!
Item was changed:
----- Method: TTCFontSet>>questionGlyphInfoInto: (in category 'private') -----
questionGlyphInfoInto: glyphInfoArray
+ "return glyph info for the question mark character in the first font of the fontArray -sort of a default set of info"
-
| f form |
f := fontArray at: 1.
form := f formOf: $?.
glyphInfoArray at: 1 put: form;
at: 2 put: 0;
at: 3 put: form width;
at: 4 put: self.
^ glyphInfoArray.
!
tim Rowledge uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-tpr.493.mcz
==================== Summary ====================
Name: Tools-tpr.493
Author: tpr
Time: 2 September 2013, 4:07:40.153 pm
UUID: c6f4774b-b4c7-4a06-8ace-af755553cd3f
Ancestors: Tools-tpr.492
Improve FileContentsBrowser a little; stop the Errors on 'senders' and 'implementors' buttons.
'hierarchy' and 'vars' could both do with fixing too, but can't think how right now.
=============== Diff against Tools-ul.491 ===============
Item was added:
+ ----- Method: FileContentsBrowser>>browseMessages (in category 'other') -----
+ browseMessages
+ "Open a message set browser of all implementors of the currently selected message"
+
+ self systemNavigation browseAllImplementorsOf: (self selectedMessageName ifNil: [ ^nil ])!
Item was added:
+ ----- Method: FileContentsBrowser>>browseSendersOfMessages (in category 'other') -----
+ browseSendersOfMessages
+ "delegate to plain browseSenders since we can't (easily) find all the enst messages within the not-real method"
+
+ ^self browseSenders!
tim Rowledge uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-tpr.493.mcz
==================== Summary ====================
Name: Tools-tpr.493
Author: tpr
Time: 2 September 2013, 4:07:40.153 pm
UUID: c6f4774b-b4c7-4a06-8ace-af755553cd3f
Ancestors: Tools-tpr.492
Improve FileContentsBrowser a little; stop the Errors on 'senders' and 'implementors' buttons.
'hierarchy' and 'vars' could both do with fixing too, but can't think how right now.
=============== Diff against Tools-ul.491 ===============
Item was added:
+ ----- Method: FileContentsBrowser>>browseMessages (in category 'other') -----
+ browseMessages
+ "Open a message set browser of all implementors of the currently selected message"
+
+ self systemNavigation browseAllImplementorsOf: (self selectedMessageName ifNil: [ ^nil ])!
Item was added:
+ ----- Method: FileContentsBrowser>>browseSendersOfMessages (in category 'other') -----
+ browseSendersOfMessages
+ "delegate to plain browseSenders since we can't (easily) find all the enst messages within the not-real method"
+
+ ^self browseSenders!
tim Rowledge uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-tpr.493.mcz
==================== Summary ====================
Name: Tools-tpr.493
Author: tpr
Time: 2 September 2013, 4:07:40.153 pm
UUID: c6f4774b-b4c7-4a06-8ace-af755553cd3f
Ancestors: Tools-tpr.492
Improve FileContentsBrowser a little; stop the Errors on 'senders' and 'implementors' buttons.
'hierarchy' and 'vars' could both do with fixing too, but can't think how right now.
=============== Diff against Tools-ul.491 ===============
Item was added:
+ ----- Method: FileContentsBrowser>>browseMessages (in category 'other') -----
+ browseMessages
+ "Open a message set browser of all implementors of the currently selected message"
+
+ self systemNavigation browseAllImplementorsOf: (self selectedMessageName ifNil: [ ^nil ])!
Item was added:
+ ----- Method: FileContentsBrowser>>browseSendersOfMessages (in category 'other') -----
+ browseSendersOfMessages
+ "delegate to plain browseSenders since we can't (easily) find all the enst messages within the not-real method"
+
+ ^self browseSenders!
Frank Shearar uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-fbs.804.mcz
==================== Summary ====================
Name: Kernel-fbs.804
Author: fbs
Time: 2 September 2013, 6:10:57.029 pm
UUID: 0345889e-dff5-8d42-bd1b-6198e307ac13
Ancestors: Kernel-fbs.803
Kernel shouldn't reference UI stuff. Even though this could well belong in System, I'm moving it to Protocol because that's the only in-image user of the message.
=============== Diff against Kernel-fbs.803 ===============
Item was removed:
- ----- Method: ClassDescription>>chooseClassVarName (in category 'instance variables') -----
- chooseClassVarName
- "Present the user with a list of class variable names and answer the one selected, or nil if none"
-
- | lines labelStream allVars index |
- lines := OrderedCollection new.
- allVars := OrderedCollection new.
- labelStream := WriteStream on: (String new: 200).
- self withAllSuperclasses reverseDo:
- [:class | | vars |
- vars := class classVarNames.
- vars do:
- [:var |
- labelStream nextPutAll: var; cr.
- allVars add: var].
- vars isEmpty ifFalse: [lines add: allVars size]].
- labelStream contents isEmpty ifTrue: [^Beeper beep]. "handle nil superclass better"
- labelStream skip: -1 "cut last CR".
- index := (UIManager default chooseFrom: (labelStream contents substrings) lines: lines).
- index = 0 ifTrue: [^ nil].
- ^ allVars at: index!
Frank Shearar uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-fbs.804.mcz
==================== Summary ====================
Name: Kernel-fbs.804
Author: fbs
Time: 2 September 2013, 6:10:57.029 pm
UUID: 0345889e-dff5-8d42-bd1b-6198e307ac13
Ancestors: Kernel-fbs.803
Kernel shouldn't reference UI stuff. Even though this could well belong in System, I'm moving it to Protocol because that's the only in-image user of the message.
=============== Diff against Kernel-fbs.803 ===============
Item was removed:
- ----- Method: ClassDescription>>chooseClassVarName (in category 'instance variables') -----
- chooseClassVarName
- "Present the user with a list of class variable names and answer the one selected, or nil if none"
-
- | lines labelStream allVars index |
- lines := OrderedCollection new.
- allVars := OrderedCollection new.
- labelStream := WriteStream on: (String new: 200).
- self withAllSuperclasses reverseDo:
- [:class | | vars |
- vars := class classVarNames.
- vars do:
- [:var |
- labelStream nextPutAll: var; cr.
- allVars add: var].
- vars isEmpty ifFalse: [lines add: allVars size]].
- labelStream contents isEmpty ifTrue: [^Beeper beep]. "handle nil superclass better"
- labelStream skip: -1 "cut last CR".
- index := (UIManager default chooseFrom: (labelStream contents substrings) lines: lines).
- index = 0 ifTrue: [^ nil].
- ^ allVars at: index!
Frank Shearar uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-fbs.804.mcz
==================== Summary ====================
Name: Kernel-fbs.804
Author: fbs
Time: 2 September 2013, 6:10:57.029 pm
UUID: 0345889e-dff5-8d42-bd1b-6198e307ac13
Ancestors: Kernel-fbs.803
Kernel shouldn't reference UI stuff. Even though this could well belong in System, I'm moving it to Protocol because that's the only in-image user of the message.
=============== Diff against Kernel-fbs.803 ===============
Item was removed:
- ----- Method: ClassDescription>>chooseClassVarName (in category 'instance variables') -----
- chooseClassVarName
- "Present the user with a list of class variable names and answer the one selected, or nil if none"
-
- | lines labelStream allVars index |
- lines := OrderedCollection new.
- allVars := OrderedCollection new.
- labelStream := WriteStream on: (String new: 200).
- self withAllSuperclasses reverseDo:
- [:class | | vars |
- vars := class classVarNames.
- vars do:
- [:var |
- labelStream nextPutAll: var; cr.
- allVars add: var].
- vars isEmpty ifFalse: [lines add: allVars size]].
- labelStream contents isEmpty ifTrue: [^Beeper beep]. "handle nil superclass better"
- labelStream skip: -1 "cut last CR".
- index := (UIManager default chooseFrom: (labelStream contents substrings) lines: lines).
- index = 0 ifTrue: [^ nil].
- ^ allVars at: index!
Frank Shearar uploaded a new version of Protocols to project The Trunk:
http://source.squeak.org/trunk/Protocols-fbs.43.mcz
==================== Summary ====================
Name: Protocols-fbs.43
Author: fbs
Time: 2 September 2013, 6:11:27.487 pm
UUID: 51179ae8-2441-b541-8916-f31433213a17
Ancestors: Protocols-fbs.42
Kernel shouldn't reference UI stuff. Even though this could well belong in System, I'm moving it to Protocol because that's the only in-image user of the message.
=============== Diff against Protocols-fbs.42 ===============
Item was added:
+ ----- Method: ClassDescription>>chooseClassVarName (in category '*Protocols-Tools') -----
+ chooseClassVarName
+ "Present the user with a list of class variable names and answer the one selected, or nil if none"
+
+ | lines labelStream allVars index |
+ lines := OrderedCollection new.
+ allVars := OrderedCollection new.
+ labelStream := WriteStream on: (String new: 200).
+ self withAllSuperclasses reverseDo:
+ [:class | | vars |
+ vars := class classVarNames.
+ vars do:
+ [:var |
+ labelStream nextPutAll: var; cr.
+ allVars add: var].
+ vars isEmpty ifFalse: [lines add: allVars size]].
+ labelStream contents isEmpty ifTrue: [^Beeper beep]. "handle nil superclass better"
+ labelStream skip: -1 "cut last CR".
+ index := (UIManager default chooseFrom: (labelStream contents substrings) lines: lines).
+ index = 0 ifTrue: [^ nil].
+ ^ allVars at: index!
Frank Shearar uploaded a new version of Protocols to project The Trunk:
http://source.squeak.org/trunk/Protocols-fbs.43.mcz
==================== Summary ====================
Name: Protocols-fbs.43
Author: fbs
Time: 2 September 2013, 6:11:27.487 pm
UUID: 51179ae8-2441-b541-8916-f31433213a17
Ancestors: Protocols-fbs.42
Kernel shouldn't reference UI stuff. Even though this could well belong in System, I'm moving it to Protocol because that's the only in-image user of the message.
=============== Diff against Protocols-fbs.42 ===============
Item was added:
+ ----- Method: ClassDescription>>chooseClassVarName (in category '*Protocols-Tools') -----
+ chooseClassVarName
+ "Present the user with a list of class variable names and answer the one selected, or nil if none"
+
+ | lines labelStream allVars index |
+ lines := OrderedCollection new.
+ allVars := OrderedCollection new.
+ labelStream := WriteStream on: (String new: 200).
+ self withAllSuperclasses reverseDo:
+ [:class | | vars |
+ vars := class classVarNames.
+ vars do:
+ [:var |
+ labelStream nextPutAll: var; cr.
+ allVars add: var].
+ vars isEmpty ifFalse: [lines add: allVars size]].
+ labelStream contents isEmpty ifTrue: [^Beeper beep]. "handle nil superclass better"
+ labelStream skip: -1 "cut last CR".
+ index := (UIManager default chooseFrom: (labelStream contents substrings) lines: lines).
+ index = 0 ifTrue: [^ nil].
+ ^ allVars at: index!
Frank Shearar uploaded a new version of Protocols to project The Trunk:
http://source.squeak.org/trunk/Protocols-fbs.43.mcz
==================== Summary ====================
Name: Protocols-fbs.43
Author: fbs
Time: 2 September 2013, 6:11:27.487 pm
UUID: 51179ae8-2441-b541-8916-f31433213a17
Ancestors: Protocols-fbs.42
Kernel shouldn't reference UI stuff. Even though this could well belong in System, I'm moving it to Protocol because that's the only in-image user of the message.
=============== Diff against Protocols-fbs.42 ===============
Item was added:
+ ----- Method: ClassDescription>>chooseClassVarName (in category '*Protocols-Tools') -----
+ chooseClassVarName
+ "Present the user with a list of class variable names and answer the one selected, or nil if none"
+
+ | lines labelStream allVars index |
+ lines := OrderedCollection new.
+ allVars := OrderedCollection new.
+ labelStream := WriteStream on: (String new: 200).
+ self withAllSuperclasses reverseDo:
+ [:class | | vars |
+ vars := class classVarNames.
+ vars do:
+ [:var |
+ labelStream nextPutAll: var; cr.
+ allVars add: var].
+ vars isEmpty ifFalse: [lines add: allVars size]].
+ labelStream contents isEmpty ifTrue: [^Beeper beep]. "handle nil superclass better"
+ labelStream skip: -1 "cut last CR".
+ index := (UIManager default chooseFrom: (labelStream contents substrings) lines: lines).
+ index = 0 ifTrue: [^ nil].
+ ^ allVars at: index!