Andreas Raab uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.404.mcz
==================== Summary ====================
Name: Morphic-ar.404
Author: ar
Time: 28 March 2010, 3:13:44.42 pm
UUID: 5ef067a6-55f8-4f4e-8aa1-f5d73a6430fa
Ancestors: Morphic-ar.403
MessageNames to the rescue!
=============== Diff against Morphic-ar.403 ===============
Item was changed:
----- Method: SearchBarMorph>>smartSearch (in category 'search') -----
smartSearch
"Take the user input and perform an appropriate search"
| input |
input := self contents asString ifEmpty:[^self].
(Smalltalk bindingOf: input) ifNotNil:[:assoc|
"It's a global or a class"
^ToolSet browse: assoc value class selector: nil.
].
(SystemNavigation new allImplementorsOf: input asSymbol) ifNotEmpty:[:list|
^SystemNavigation new
browseMessageList: list
name: 'Implementors of ' , input
].
input first isUppercase ifTrue:[
(Utilities classFromPattern: input withCaption: '') ifNotNil:[:aClass|
^ToolSet browse: aClass selector: nil.
].
] ifFalse:[
+ ^ToolSet default browseMessageNames: input
- "Should offer a list of selectors or so"
].
"Not found"
Beeper beepPrimitive.!
Andreas Raab uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ar.84.mcz
==================== Summary ====================
Name: MorphicExtras-ar.84
Author: ar
Time: 28 March 2010, 3:04:38.596 pm
UUID: e21b4f7f-8d67-2541-97c2-49b66e3877fd
Ancestors: MorphicExtras-nice.83, MorphicExtras-klub.83
Merging MorphicExtras-klub.83:
- ClockMorph doesn't render subsecond values anymore
=============== Diff against MorphicExtras-nice.83 ===============
Item was changed:
----- Method: ClockMorph>>step (in category 'stepping and presenter') -----
step
+
| time |
super step.
+ time := String streamContents: [ :stream |
+ | t |
+ t := Time now.
+ t seconds: t asSeconds. "ignore nanoSeconds"
+ t
+ print24: (show24hr == true)
+ showSeconds: (showSeconds == true)
+ on: stream].
+ self contents: time!
- time := String streamContents:
- [:aStrm | Time now print24: (show24hr == true) showSeconds: (showSeconds == true) on: aStrm].
-
- self contents: time !
Item was changed:
----- Method: ClockMorph>>stepTime (in category 'testing') -----
stepTime
"Answer the desired time between steps in milliseconds."
+ ^999!
- ^ 1000!
Nicolas Cellier uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-nice.83.mcz
==================== Summary ====================
Name: MorphicExtras-nice.83
Author: nice
Time: 28 March 2010, 10:44:30.839 pm
UUID: 1801796e-2b23-40cb-a749-256d1658a4d9
Ancestors: MorphicExtras-nice.82
Fix _ assignment in some class comments
=============== Diff against MorphicExtras-nice.82 ===============
Item was changed:
RectangleMorph subclass: #GradientFillMorph
instanceVariableNames: 'fillColor2 gradientDirection colorArray colorDepth'
classVariableNames: ''
poolDictionaries: ''
category: 'MorphicExtras-Widgets'!
+ !GradientFillMorph commentStamp: 'nice 3/25/2010 23:01' prior: 0!
- !GradientFillMorph commentStamp: '<historical>' prior: 0!
Class GradientFillMorph is obsolete. For getting gradient fills use a BorderedMorph with an appropriate fill style, e.g.,
| morph fs |
+ morph := BorderedMorph new.
+ fs := GradientFillStyle ramp: {0.0 -> Color red. 1.0 -> Color green}.
- morph _ BorderedMorph new.
- fs _ GradientFillStyle ramp: {0.0 -> Color red. 1.0 -> Color green}.
fs origin: morph bounds center.
fs direction: (morph bounds width // 2) @ 0.
fs radial: true.
morph fillStyle: fs.
World primaryHand attachMorph: morph.
Here's the old (obsolete) comment:
GradientFills cache an array of bitpatterns for the colors across their rectangle. It costs a bit of space, but makes display fast enough to eschew the use of a bitmap. The array must be recomputed whenever the colors, dimensions or display depth change.!
Item was changed:
Object subclass: #Command
instanceVariableNames: 'phase cmdWording undoTarget undoSelector undoArguments redoTarget redoSelector redoArguments parameters'
classVariableNames: ''
poolDictionaries: ''
category: 'MorphicExtras-Undo'!
+ !Command commentStamp: 'nice 3/25/2010 22:59' prior: 0!
- !Command commentStamp: '<historical>' prior: 0!
An object representing an undoable command to be done in the environment.
Structure:
phase indicates whether the cmd is current in undone or redone mode
cmdWording The wording of the command (used in arming the "undo"/"redo" menu items
parameters an IdentityDictionary /NOT USED/
undoTarget Receiver, selector and arguments to accomplish undo
undoSelector
undoArguments
redoTarget Receiver, selector and arguments to accomplish redo
redoSelector
redoArguments
To use this, for any command you wish to use, you
* Create an instance of Command, as follows...
+ cmd := Command new cmdWording: 'resizing'.
- cmd _ Command new cmdWording: 'resizing'.
* Give the the command undo state and redo state, as follows...
cmd undoTarget: target selector: #extent: argument: oldExtent.
cmd redoTarget: target selector: #extent: argument: newExtent.
* Send a message of the form
Command rememberCommand: cmd
LastCommand is the last command that was actually done or undone.
CommandHistory, applicable only when infiniteUndo is set, holds a 'tape' of the complete history of commands, as far back as it's possible to go.
CommandExcursions, also applicable only in the infiniteUndo case, and rather at the fringe even then, holds segments of former CommandHistory that have been lopped off because of variant paths taken.!
Nicolas Cellier uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-nice.67.mcz
==================== Summary ====================
Name: Network-nice.67
Author: nice
Time: 28 March 2010, 10:36:49.996 pm
UUID: 64b9fd8e-4cf4-4f47-bce6-d70517a4842c
Ancestors: Network-bp.66
1) fix some _ assignment
2) add Socket support for #next:putAll:startingAt: and #readInto:startingAt:count:
3) do not let ascii/binary resetBuffers gratuitously
=============== Diff against Network-bp.66 ===============
Item was changed:
----- Method: SocketStream>>ascii (in category 'configuration') -----
ascii
"Tell the SocketStream to send data
as Strings instead of ByteArrays.
This is default."
binary := false.
+ inBuffer
+ ifNil: [self resetBuffers]
+ ifNotNil:
+ [inBuffer := inBuffer asString.
+ outBuffer := outBuffer asString]!
- self resetBuffers!
Item was changed:
----- Method: SocketStream>>binary (in category 'configuration') -----
binary
"Tell the SocketStream to send data
as ByteArrays instead of Strings.
Default is ascii."
binary := true.
+ inBuffer
+ ifNil: [self resetBuffers]
+ ifNotNil:
+ [inBuffer := inBuffer asByteArray.
+ outBuffer := outBuffer asByteArray]!
- self resetBuffers!
Item was added:
+ ----- Method: SocketStream>>next:putAll:startingAt: (in category 'stream out') -----
+ next: n putAll: aCollection startingAt: startIndex
+ "Put a String or a ByteArray onto the stream.
+ Currently a large collection will allocate a large buffer.
+ Warning: this does not work with WideString: they have to be converted first."
+
+ self adjustOutBuffer: n.
+ outBuffer replaceFrom: outNextToWrite to: outNextToWrite + n - 1 with: aCollection startingAt: startIndex.
+ outNextToWrite := outNextToWrite + n.
+ self checkFlush.
+ ^aCollection!
Item was added:
+ ----- Method: SocketStream>>readInto:startingAt:count: (in category 'stream in') -----
+ readInto: aCollection startingAt: startIndex count: anInteger
+ "Read n objects into the given collection starting at startIndex.
+ Return number of elements that have been read."
+
+ "Implementation note: This method DOES signal timeout if not
+ enough elements are received. It does NOT signal
+ ConnectionClosed as closing the connection is the only way by
+ which partial data can be read."
+
+ | start amount |
+
+ [self receiveData: anInteger] on: ConnectionClosed do:[:ex| ex return].
+
+ "Inlined version of nextInBuffer: to avoid copying the contents"
+ amount := anInteger min: (inNextToWrite - lastRead - 1).
+ start := lastRead + 1.
+ lastRead := lastRead + amount.
+ aCollection
+ replaceFrom: startIndex
+ to: startIndex + amount-1
+ with: inBuffer
+ startingAt: start.
+ ^amount!
Item was changed:
----- Method: ServerDirectory>>oldFileOrNoneNamed: (in category 'file directory') -----
oldFileOrNoneNamed: fullName
"If the file exists, answer a read-only RemoteFileStream on it. If it doesn't, answer nil. fullName is directory path, and does include name of the server. Or just a simple fileName. Do prefetch the data."
^ Cursor wait showWhile:
+ [ | file |
+ file := self asServerFileNamed: fullName.
- [ | file |file := self asServerFileNamed: fullName.
file readOnly.
"file exists ifFalse: [^ nil]." "on the server"
file isTypeFile
ifTrue: [FileStream oldFileOrNoneNamed: (file fileNameRelativeTo: self)]
ifFalse: [self streamOnBeginningOf: file]]!
Item was changed:
----- Method: MailAddressTokenizer class>>initialize (in category 'class initialization') -----
initialize
"Initalize class variables using MailAddressTokenizer initialize"
| atomChars |
+ CSParens := CharacterSet empty.
- CSParens _ CharacterSet empty.
CSParens addAll: '()'.
+ CSSpecials := CharacterSet empty.
- CSSpecials _ CharacterSet empty.
CSSpecials addAll: '()<>@,;:\".[]'.
+ CSNonSeparators := CharacterSet separators complement.
- CSNonSeparators _ CharacterSet separators complement.
"(from RFC 2822)"
atomChars := CharacterSet empty.
atomChars addAll: ($A to: $Z).
atomChars addAll: ($a to: $z).
atomChars addAll: ($0 to: $9).
atomChars addAll: '!!#$%^''*+-/=?^_`{|}~'.
CSNonAtom := atomChars complement.!
Nicolas Cellier uploaded a new version of TrueType to project The Trunk:
http://source.squeak.org/trunk/TrueType-nice.15.mcz
==================== Summary ====================
Name: TrueType-nice.15
Author: nice
Time: 28 March 2010, 7:10:44.962 pm
UUID: 6a8e5e5b-bcf5-4e58-8edf-6f5fa1f9f3c5
Ancestors: TrueType-nice.14
Authorize parsing of TTCF file version 2.
That certainly is not sufficient, but at least, that allows (TTFileDescription installFamilyNamed: 'Arial') to work on Mac Snow Leopard.
=============== Diff against TrueType-nice.14 ===============
Item was changed:
----- Method: TTFileDescription class>>allFamilyNamesAndFiles (in category 'font paths') -----
allFamilyNamesAndFiles
"Answer a dictionary of all known family names and their corresponding file names."
AllFontsAndFiles ifNil:[
AllFontsAndFiles := Dictionary new.
+ Cursor wait showWhile:[self allFontsDo:[:font|
+ | names |
- Cursor wait showWhile:[self allFontsDo:[:font| | names |
names := AllFontsAndFiles at: font familyName
ifAbsentPut:[OrderedCollection new].
names add: font fileName]]].
^AllFontsAndFiles !
Item was changed:
----- Method: TTFileDescription class>>allFontsAndFiles (in category 'font paths') -----
allFontsAndFiles
"Answer a dictionary of all known family names and their corresponding file names."
AllFontsAndFiles ifNil:[
AllFontsAndFiles := Dictionary new.
+ Cursor wait showWhile:[self allFontsDo:[:font|
+ | names |
- Cursor wait showWhile:[self allFontsDo:[:font| | names |
names := AllFontsAndFiles at: font familyName
ifAbsentPut:[OrderedCollection new].
names add: font fileName]]].
^AllFontsAndFiles !
Item was changed:
----- Method: TTFileDescription class>>fontOffsetsInFile: (in category 'instance creation') -----
fontOffsetsInFile: file
"Answer a collection of font offsets in the given file"
| tag version nFonts |
file position: 0.
tag := file next: 4.
+ tag caseOf: {
- tag caseOf:{
['true' asByteArray] -> ["Version 1.0 TTF file"
"http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6.html
The values 'true' (0x74727565) and 0x00010000 are recognized by the Mac OS
as referring to TrueType fonts."
^Array with: 0 "only one font"
].
[#[0 1 0 0]] -> ["Version 1.0 TTF file"
^Array with: 0 "only one font"
].
['ttcf' asByteArray] -> ["TTC file"
version := file next: 4.
+ (version = #[0 1 0 0] or: [version = #[0 2 0 0]]) ifFalse: [^self error: 'Unsupported TTC version'].
- version = #(0 1 0 0) asByteArray ifFalse:[^self error: 'Unsupported TTC version'].
nFonts := file nextNumber: 4.
+ ^(1 to: nFonts) collect: [:i | file nextNumber: 4].
- ^(1 to: nFonts) collect:[:i| file nextNumber: 4].
].
} otherwise:[
self error: 'This is not a valid Truetype file'.
].!
A new version of MorphicExtras was added to project The Inbox:
http://source.squeak.org/inbox/MorphicExtras-klub.83.mcz
==================== Summary ====================
Name: MorphicExtras-klub.83
Author: klub
Time: 28 March 2010, 5:40:52.693 pm
UUID: b8d4b85b-973b-4d5a-b9ae-9a5fb0477f15
Ancestors: MorphicExtras-nice.82
- ClockMorph doesn't render subsecond values anymore
=============== Diff against MorphicExtras-nice.82 ===============
Item was changed:
----- Method: ClockMorph>>step (in category 'stepping and presenter') -----
step
+
| time |
super step.
+ time := String streamContents: [ :stream |
+ | t |
+ t := Time now.
+ t seconds: t asSeconds. "ignore nanoSeconds"
+ t
+ print24: (show24hr == true)
+ showSeconds: (showSeconds == true)
+ on: stream].
+ self contents: time!
- time := String streamContents:
- [:aStrm | Time now print24: (show24hr == true) showSeconds: (showSeconds == true) on: aStrm].
-
- self contents: time !
Item was changed:
----- Method: ClockMorph>>stepTime (in category 'testing') -----
stepTime
"Answer the desired time between steps in milliseconds."
+ ^999!
- ^ 1000!