Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
February 2011
- 111 participants
- 2276 messages
Re: [Pharo-project] Issue 2146 in pharo: Fix SystemChangeNotification for traits.
by pharo@googlecode.com
Comment #5 on issue 2146 by cy.delau...(a)gmail.com: Fix
SystemChangeNotification for traits.
http://code.google.com/p/pharo/issues/detail?id=2146
yes, it does
Feb. 6, 2011
Re: [Pharo-project] Issue 3672 in pharo: terminate suspended compiler process on window close
by pharo@googlecode.com
Updates:
Summary: terminate suspended compiler process on window close
Comment #1 on issue 3672 by stephane...(a)gmail.com: terminate suspended
compiler process on window close
http://code.google.com/p/pharo/issues/detail?id=3672
(No comment was entered for this change.)
Feb. 6, 2011
[Pharo-project] Issue 3672 in pharo: Prevent that the SyntaxError window leaves a suspended compiler process behind on window close
by pharo@googlecode.com
Status: FixedWaitingToBePharoed
Owner: stephane...(a)gmail.com
Labels: Type-Squeak
New issue 3672 by stephane...(a)gmail.com: Prevent that the SyntaxError
window leaves a suspended compiler process behind on window close
http://code.google.com/p/pharo/issues/detail?id=3672
Name: Tools-laza.291
Author: laza
Time: 26 January 2011, 1:41:13.31 pm
UUID: 6daf6a43-2737-ca44-90a4-ce11386f5bd1
Ancestors: Tools-mtf.290
Prevent that the SyntaxError window leaves a suspended compiler process
behind on window close
=============== Diff against Tools-mtf.290 ===============
Item was changed:
+ ----- Method: SyntaxError>>category: (in category 'accessing') -----
- ----- Method: SyntaxError>>category: (in category 'initialization') -----
category: aSymbol
"Record the message category of method being compiled. This is used
when the user corrects the error and accepts."
category := aSymbol.
!
Item was added:
+ ----- Method: SyntaxError>>release (in category 'initialize-release')
-----
+ release
+ | p |
+ (debugger isNil or: [
+ (p := debugger interruptedProcess) isNil or: [
+ p isTerminated]]) ifTrue: [^self].
+
+ p terminate!
Feb. 6, 2011
Re: [Pharo-project] Issue 3671 in pharo: Shout: mark ByteArray literals as ByteArrays instead of Arrays
by pharo@googlecode.com
Comment #1 on issue 3671 by stephane...(a)gmail.com: Shout: mark ByteArray
literals as ByteArrays instead of Arrays
http://code.google.com/p/pharo/issues/detail?id=3671
Item was changed:
----- Method: SHTextStylerST80 class>>subduedStyleTable (in
category 'style table') -----
subduedStyleTable
"color can be a valid argument to Color class>>colorFrom: , or nil to
use the editor text color.
Multiple emphases can be specified using an array e.g. #(bold
italic).
If emphasis is not specified, #normal will be used.
if pixel height is not specified , then the editor font size will be
used.
"
^#(
"(symbol color [emphasisSymbolOrArray
[textStyleName [pixelHeight]]])"
(default
black )
(invalid
red )
(excessCode
red )
(comment
(cyan muchDarker) )
(unfinishedComment (red
muchDarker) italic)
(#'$'
(red muchDarker) )
(character
(red muchDarker) )
(integer
(red muchDarker) )
(number (red
muchDarker) )
(#-
(red muchDarker) )
(symbol
(blue muchDarker) )
(stringSymbol
(blue muchDarker) )
(literalArray
(blue muchDarker) )
(string
(magenta muchDarker) normal )
(unfinishedString
red normal )
(assignment
nil bold )
(ansiAssignment
nil bold)
(literal
nil italic)
(keyword
(blue muchDarker) )
(binary
(blue muchDarker) )
(unary
(blue muchDarker) )
(incompleteKeyword
(gray muchDarker) underlined)
(incompleteBinary
(gray muchDarker) underlined)
(incompleteUnary
(gray muchDarker) underlined)
(undefinedKeyword
red )
(undefinedBinary
red )
(undefinedUnary
red )
(patternKeyword
nil bold)
(patternBinary
nil bold)
(patternUnary
nil bold)
(#self
(red muchDarker) )
(#super
(red muchDarker) )
(#true
(red muchDarker) )
(#false
(red muchDarker) )
(#nil
(red muchDarker) )
(#thisContext (red
muchDarker) )
(#return
(red muchDarker) )
(patternArg
(blue muchDarker) )
(methodArg
(blue muchDarker) )
(blockPatternArg
(blue muchDarker) )
(blockArg
(blue muchDarker) )
(argument
(blue muchDarker) )
(blockArgColon
black )
(leftParenthesis
black )
(rightParenthesis
black )
(leftParenthesis1
(green muchDarker) )
(rightParenthesis1
(green muchDarker) )
(leftParenthesis2
(magenta muchDarker) )
(rightParenthesis2
(magenta muchDarker) )
(leftParenthesis3 (red
muchDarker) )
(rightParenthesis3 (red
muchDarker) )
(leftParenthesis4
(green darker) )
(rightParenthesis4
(green darker) )
(leftParenthesis5
(orange darker) )
(rightParenthesis5
(orange darker) )
(leftParenthesis6
(magenta darker) )
(rightParenthesis6
(magenta darker) )
(leftParenthesis7
blue )
(rightParenthesis7
blue )
(blockStart
black )
(blockEnd
black )
(blockStart1
(green muchDarker) )
(blockEnd1
(green muchDarker) )
(blockStart2
(magenta muchDarker) )
(blockEnd2
(magenta muchDarker) )
(blockStart3
(red muchDarker) )
(blockEnd3
(red muchDarker) )
(blockStart4
(green darker) )
(blockEnd4
(green darker) )
(blockStart5
(orange darker) )
(blockEnd5
(orange darker) )
(blockStart6
(magenta darker) )
(blockEnd6
(magenta darker) )
(blockStart7
blue )
(blockEnd7
blue )
(arrayStart
black )
(arrayEnd
black )
(arrayStart1
black )
(arrayEnd1
black )
+
(byteArrayStart
black )
+
(byteArrayEnd
black )
+
(byteArrayStart1
black )
+
(byteArrayEnd1
black )
(leftBrace
black )
(rightBrace
black )
...
Feb. 6, 2011
[Pharo-project] Issue 3671 in pharo: Shout: mark ByteArray literals as ByteArrays instead of Arrays
by pharo@googlecode.com
Status: FixedWaitingToBePharoed
Owner: stephane...(a)gmail.com
Labels: Type-Squeak Milestone-1.3
New issue 3671 by stephane...(a)gmail.com: Shout: mark ByteArray literals as
ByteArrays instead of Arrays
http://code.google.com/p/pharo/issues/detail?id=3671
Name: ShoutCore-ul.28
Author: ul
Time: 28 January 2011, 1:17:21.77 am
UUID: 29ed9d42-0ccc-fc49-a38d-57214f045916
Ancestors: ShoutCore-ul.27
- mark ByteArray literals as ByteArrays instead of Arrays
=============== Diff against ShoutCore-ul.27 ===============
Item was changed:
----- Method: SHParserST80>>parseByteArray (in category 'parse') -----
parseByteArray
[currentTokenFirst == $]] whileFalse: [
currentTokenFirst isDigit
ifTrue: [
"do not parse the number, can be time
consuming"
self scanPast: #number]
ifFalse: [
self failWhen: currentTokenFirst == $. .
self error]].
+ self scanPast: #byteArrayEnd!
- self scanPast: #arrayEnd!
Item was changed:
----- Method: SHParserST80>>parseSymbol (in category 'parse') -----
parseSymbol
| c |
currentToken = '#'
ifTrue: [
"if token is just the #, then scan whitespace and
comments
and then process the next character.
Squeak allows space between the # and the start of
the symbol
e.g. # (), # a, # 'sym' "
self rangeType: #symbol.
self scanWhitespace].
c := self currentChar.
self failWhen: (c isNil or: [c isSeparator]).
c == $(
ifTrue: [
self nextChar.
self scanPast: #arrayStart start:
currentTokenSourcePosition end: currentTokenSourcePosition + 1.
^self parseArray].
c == $' ifTrue: [^self parseSymbolString].
c == $[ ifTrue: [
self nextChar.
+ self scanPast: #byteArrayStart start:
currentTokenSourcePosition end: currentTokenSourcePosition + 1.
- self scanPast: #arrayStart start:
currentTokenSourcePosition end: currentTokenSourcePosition + 1.
^self parseByteArray].
((self isSelectorCharacter: c) or: [c == $-])
ifTrue: [^self parseSymbolSelector].
(c isLetter or: [
c == $: or: [
c == $_ and: [self allowUnderscoreSelectors] ] ])
ifTrue: [^self parseSymbolIdentifier].
^self parseCharSymbol!
Item was changed:
----- Method: SHTextStylerST80 class>>defaultStyleTable (in
category 'style table') -----
defaultStyleTable
"color can be a valid argument to Color class>>colorFrom: , or nil to
use the editor text color.
Multiple emphases can be specified using an array e.g. #(bold
italic).
If emphasis is not specified, #normal will be used.
if pixel height is not specified , then the editor font size will be
used.
"
^#(
"(symbol color [emphasisSymbolOrArray
[textStyleName [pixelHeight]]])"
(default
black )
(invalid
red )
(excessCode
red )
(comment
(green muchDarker) italic)
(unfinishedComment (red
muchDarker) italic)
(#'$'
(red muchDarker) )
(character
(red muchDarker) )
(integer
(red muchDarker) )
(number (red
muchDarker) )
(#-
(red muchDarker) )
(symbol
(blue muchDarker) bold)
(stringSymbol
(blue muchDarker) bold)
(literalArray
(blue muchDarker) bold)
(string
(magenta muchDarker) normal)
(unfinishedString
red normal )
(assignment
nil bold )
(ansiAssignment
nil bold)
(literal
nil italic)
(keyword
(blue muchDarker) )
(binary
(blue muchDarker) )
(unary
(blue muchDarker) )
(incompleteKeyword
(gray muchDarker) underlined)
(incompleteBinary
(gray muchDarker) underlined)
(incompleteUnary
(gray muchDarker) underlined)
(undefinedKeyword
red )
(undefinedBinary
red )
(undefinedUnary
red )
(patternKeyword
nil bold)
(patternBinary
nil bold)
(patternUnary
nil bold)
(#self
(red muchDarker) bold)
(#super
(red muchDarker) bold)
(#true
(red muchDarker) bold)
(#false
(red muchDarker) bold)
(#nil
(red muchDarker) bold)
(#thisContext (red
muchDarker) bold)
(#return
(red muchDarker) bold)
(patternArg
(blue muchDarker) italic)
(methodArg
(blue muchDarker) italic)
(blockPatternArg
(blue muchDarker) italic)
(blockArg
(blue muchDarker) italic)
(argument
(blue muchDarker) italic)
(blockArgColon
black )
(leftParenthesis
black )
(rightParenthesis
black )
(leftParenthesis1
(green muchDarker) )
(rightParenthesis1
(green muchDarker) )
(leftParenthesis2
(magenta muchDarker) )
(rightParenthesis2
(magenta muchDarker) )
(leftParenthesis3 (red
muchDarker) )
(rightParenthesis3 (red
muchDarker) )
(leftParenthesis4
(green darker) )
(rightParenthesis4
(green darker) )
(leftParenthesis5
(orange darker) )
(rightParenthesis5
(orange darker) )
(leftParenthesis6
(magenta darker) )
(rightParenthesis6
(magenta darker) )
(leftParenthesis7
blue )
(rightParenthesis7
blue )
(blockStart
black )
(blockEnd
black )
(blockStart1
(green muchDarker) )
(blockEnd1
(green muchDarker) )
(blockStart2
(magenta muchDarker) )
(blockEnd2
(magenta muchDarker) )
(blockStart3
(red muchDarker) )
(blockEnd3
(red muchDarker) )
(blockStart4
(green darker) )
(blockEnd4
(green darker) )
(blockStart5
(orange darker) )
(blockEnd5
(orange darker) )
(blockStart6
(magenta darker) )
(blockEnd6
(magenta darker) )
(blockStart7
blue )
(blockEnd7
blue )
(arrayStart
black )
(arrayEnd
black )
(arrayStart1
black )
(arrayEnd1
black )
+
(byteArrayStart
black )
+
(byteArrayEnd
black )
+
(byteArrayStart1
black )
+
(byteArrayEnd1
black )
(leftBrace
black )
(rightBrace
black )
....
Feb. 6, 2011
Re: [Pharo-project] [COTDC] 3 - HTTPClient
by Philippe Marschall
On 06.02.2011 21:42, Philippe Marschall wrote:
> On 06.02.2011 18:01, laurent laffont wrote:
>> Comment Of The Day Contest - One Day One Comment
>> Rules: Each day a not commented class is elected. Each day the best
>> comment will be integrated with name of the author(s).
>>
>>
>> Today: HTTPClient
>
> <trollmode>
> I'm a good example of how not to write code. Turn around, walk away,
> fast. I'm fully of bugs.
>
> Somebody at some point thought that HTTP is a simple "hacker with
> telnet"-protocol. It's not.
> </trollmode>
That's actually HTTPSocket, not HTTPClient.
Cheers
Philippe
Feb. 6, 2011
[Pharo-project] Issue 3670 in pharo: Fixes for Latin1Environment from EToys
by pharo@googlecode.com
Status: FixedWaitingToBePharoed
Owner: stephane...(a)gmail.com
Labels: Type-Squeak Milestone-1.3
New issue 3670 by stephane...(a)gmail.com: Fixes for Latin1Environment from
EToys
http://code.google.com/p/pharo/issues/detail?id=3670
Name: Multilingual-sn.131
Author: sn
Time: 8 November 2010, 12:54:12.262 am
UUID: 64aa8ddf-9938-4373-a45d-7bde1c0ccced
Ancestors: Multilingual-ul.130
Fixes for Latin1Environment from EToys
=============== Diff against Multilingual-ul.130 ===============
Item was changed:
----- Method: Latin1Environment class>>fileNameConverterClass (in
category 'subclass responsibilities') -----
fileNameConverterClass
+ ^ self systemConverterClass
- ^ Latin1TextConverter
!
Item was changed:
----- Method: Latin1Environment class>>inputInterpreterClass (in
category 'subclass responsibilities') -----
inputInterpreterClass
| platformName osVersion |
platformName := SmalltalkImage current platformName.
osVersion := SmalltalkImage current osVersion.
(platformName = 'Win32' and: [osVersion ~= 'CE'])
ifTrue: [^ (self win32VMUsesUnicode) ifTrue:
[UTF32InputInterpreter] ifFalse: [MacRomanInputInterpreter]].
platformName = 'Mac OS'
+ ifTrue: [^ MacUnicodeInputInterpreter].
- ifTrue: [^ MacRomanInputInterpreter].
platformName = 'unix'
ifTrue: [^ UTF32InputInterpreter].
+ ^ MacUnicodeInputInterpreter!
- ^ MacRomanInputInterpreter!
Item was changed:
----- Method: Latin1Environment class>>systemConverterClass (in
category 'subclass responsibilities') -----
systemConverterClass
+ | platformName osVersion |
+ platformName := SmalltalkImage current platformName.
+ osVersion := SmalltalkImage current getSystemAttribute: 1002.
+ (platformName = 'Win32'
+ and: [osVersion = 'CE'])
+ ifTrue: [^ MacRomanTextConverter].
+ platformName = 'Win32'
+ ifTrue: [^ (self win32VMUsesUnicode) ifTrue:
[UTF8TextConverter] ifFalse: [Latin1TextConverter]].
+ platformName = 'Mac OS'
+ ifTrue: [^ ('10*' match: SmalltalkImage current osVersion)
+ ifTrue: [UTF8TextConverter]
+ ifFalse: [MacRomanTextConverter]].
+ platformName = 'unix'
+ ifTrue: [^ UTF8TextConverter].
+ ^ MacRomanTextConverter!
- ^ Latin1TextConverter.
- !
Item was changed:
----- Method: MacUnicodeInputInterpreter>>initialize (in
category 'initialization') -----
initialize
| satisfiesVersion |
satisfiesVersion := self
majorMinorBuildFrom: SmalltalkImage current
vmVersion
+ satisfies: [:major :minor :build |
+ major >= 4 or: [
+ major >= 3 and: [minor >= 8 and:
[build >= 7]]]].
- satisfies: [:major :minor :build | (major
>= 3
- and: [minor >= 8
- and: [build
>= 7]]) or: [major >= 4]].
-
satisfiesVersion
ifTrue: [keyValueIndex := 6]
ifFalse: [keyValueIndex := 3]!
Feb. 6, 2011
Re: [Pharo-project] [COTDC] 3 - HTTPClient
by Philippe Marschall
On 06.02.2011 18:01, laurent laffont wrote:
> Comment Of The Day Contest - One Day One Comment
> Rules: Each day a not commented class is elected. Each day the best
> comment will be integrated with name of the author(s).
>
>
> Today: HTTPClient
<trollmode>
I'm a good example of how not to write code. Turn around, walk away,
fast. I'm fully of bugs.
Somebody at some point thought that HTTP is a simple "hacker with
telnet"-protocol. It's not.
</trollmode>
Philippe
Feb. 6, 2011
[Pharo-project] Issue 3669 in pharo: Unified API for accessing stdio streams
by pharo@googlecode.com
Status: FixedWaitingToBePharoed
Owner: stephane...(a)gmail.com
Labels: Type-Squeak 1.3
New issue 3669 by stephane...(a)gmail.com: Unified API for accessing stdio
streams
http://code.google.com/p/pharo/issues/detail?id=3669
Levente Uzonyi uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ul.96.mcz
==================== Summary ====================
it may be interesting for Coral and scripting.
Name: Files-ul.96
Author: ul
Time: 24 January 2011, 3:45:32.858 am
UUID: d06be799-4c77-3b46-aff8-4abc589fafd3
Ancestors: Files-mtf.95
Stdio support changes:
- Added stdio support code to FileStream.
- Unified API for accessing stdio streams. All users should send #stdin,
#stdout and #stderr to FileStream to access the streams.
- MultiByteFileStream is used instead of CrLfFileStream.
- CrLfFileStream class >> #new is now deprecated
=============== Diff against Files-mtf.95 ===============
Item was changed:
StandardFileStream subclass: #CrLfFileStream
instanceVariableNames: 'lineEndConvention'
classVariableNames: 'Cr CrLf Lf LineEndDefault LineEndStrings
LookAheadCount'
poolDictionaries: ''
category: 'Files-Kernel'!
+ !CrLfFileStream commentStamp: 'ul 12/26/2010 03:13' prior: 0!
+ This class is now obsolete, use MultiByteFileStream instead.
+
- !CrLfFileStream commentStamp: 'ls 11/10/2002 13:32' prior: 0!
I am the same as a regular file stream, except that when I am in text
mode, I will automatically convert line endings between the underlying
platform's convention, and Squeak's convention of carriage-return only.
The goal is that Squeak text files can be treated as OS text files, and
vice versa.
In binary mode, I behave identically to a StandardFileStream.
To enable CrLfFileStream as the default file stream class for an entire
image, modify FileStream class concreteStream .
There are two caveats on programming with CrLfFileStream.
First, the choice of text mode versus binary mode affects which characters
are visible in Squeak, and no longer just affects whether those characters
are returned as Character's or as Integer's. Thus the choice of mode needs
to be made very carefully, and must be based on intent instead of
convenience of representation. The methods asString, asByteArray,
asCharacter, and asInteger can be used to convert between character and
integer representations. (Arguably, file streams should accept either
strings or characters in nextPut: and nextPutAll:, but that is not the case
right now.)
Second, arithmetic on positions no longer works, because one character
that Squeak sees (carriage return) could map to two characters in the
underlying file (carriage return plus line feed, on MS Windows and MS
DOS). Comparison between positions still works. (This caveat could
perhaps be fixed by maintaining a map between Squeak positions and
positions in the underlying file, but it is complicated. Consider, for
example, updates to the middle of the file. Also, consider that text files
are rarely updated in the middle of the file, and that general random
access to a text file is rarely very useful. If general random access with
specific file counts is desired, then the file is starting to sound like a
binary file instead of a text file.)
!
Item was changed:
----- Method: CrLfFileStream class>>new (in category 'class
initialization') -----
new
+ self deprecated: 'This class is now obsolete, use
MultiByteFileStream instead.'.
^ (MultiByteFileStream new) wantsLineEndConversion: true; yourself.
!
Item was removed:
- ----- Method: CrLfFileStream class>>newForStdio (in category 'instance
creation') -----
- newForStdio
- "Circumvent CrLfFileStream new's retuning an instance of
MultiBteFileStream"
- ^super new!
Item was removed:
- ----- Method: CrLfFileStream>>openOnHandle:name:forWrite: (in
category 'open/close') -----
- openOnHandle: aFileID name: streamName forWrite: writeMode
- "Initialize the file with the given handle. If writeMode is true
then
- allow writing, otherwise put the file in read-only mode."
- super openOnHandle: aFileID name: streamName forWrite: writeMode.
- lineEndConvention := LineEndDefault!
Item was changed:
ReadWriteStream subclass: #FileStream
instanceVariableNames: 'rwmode'
+ classVariableNames: 'EncodeAndDecodeStdioFiles Stderr Stdin
StdioFiles Stdout TheStdioHandles'
- classVariableNames: ''
poolDictionaries: ''
category: 'Files-Kernel'!
!FileStream commentStamp: '<historical>' prior: 0!
I represent a Stream that accesses a FilePage from a File. One use for my
instance is to access larger "virtual Strings" than can be stored
contiguously in main memory. I restrict the objects stored and retrieved to
be Integers or Characters. An end of file pointer terminates reading; it
can be extended by writing past it, or the file can be explicitly truncated.
To use the file system for most applications, you typically create a
FileStream. This is done by sending a message to a FileDirectory (file:,
oldFile:, newFile:, rename:newName:) which creates an instance of me.
Accesses to the file are then done via my instance.
*** On DOS, files cannot be shortened!! *** To overwrite a file with a
shorter one, first delete the old file (FileDirectory deleteFilePath: 'Hard
Disk:aFolder:dataFolder:foo') or (aFileDirectory deleteFileNamed: 'foo').
Then write your new shorter version.!
Item was added:
+ ----- Method: FileStream class>>encodeAndDecodeStdioFiles (in
category 'stdio') -----
+ encodeAndDecodeStdioFiles
+
+ <preference: 'Encode and decode the contents of stdio files.'
+ category: 'Files'
+ description: 'It true, then the contents of stdin, stdout
and stderr are encoded/decoded using the system default text converter.'
+ type: #Boolean>
+ ^EncodeAndDecodeStdioFiles ifNil: [ true ]!
Item was added:
+ ----- Method: FileStream class>>encodeAndDecodeStdioFiles: (in
category 'stdio') -----
+ encodeAndDecodeStdioFiles: aBoolean
+
+ EncodeAndDecodeStdioFiles := aBoolean.
+ self updateStdioFiles!
Item was added:
+ ----- Method: FileStream class>>flushAndVoidStdioFiles (in
category 'stdio') -----
+ flushAndVoidStdioFiles
+
+ StdioFiles ifNotNil: [
+ StdioFiles do: [ :file |
+ file ifNotNil: [
+ file isReadOnly ifFalse: [
+ [ file flush ]
+ on: Error
+ do: [ :ex | "care less" ] ]
] ].
+ self voidStdioFiles ]!
Item was changed:
----- Method: FileStream class>>initialize (in
category 'initialize-release') -----
initialize
+ FileServices registerFileReader: self.
+ EncodeAndDecodeStdioFiles := true.
+ TheStdioHandles := Array new: 3.
+ Smalltalk
+ addToStartUpList: self after: SecurityManager; "the intent
being before: AutoStart"
+ addToShutDownList: self after: SecurityManager!
- FileServices registerFileReader: self!
Item was added:
+ ----- Method: FileStream class>>newForStdio (in category 'stdio') -----
+ newForStdio
+ "This is a hook for subclasses to initialize themselves properly."
+
+ ^self new!
Item was added:
+ ----- Method: FileStream class>>shutDown: (in category 'system startup')
-----
+ shutDown: quitting
+
+ quitting ifTrue: [ self flushAndVoidStdioFiles ]!
Item was added:
+ ----- Method: FileStream class>>standardIOStreamNamed:forWrite: (in
category 'stdio') -----
+ standardIOStreamNamed: moniker forWrite: forWrite
+
+ | index |
+ index := #(stdin stdout stderr) identityIndexOf: moniker.
+ ^((StdioFiles ifNil: [ StdioFiles := Array new: 3 ]) at: index)
+ ifNil: [
+ StdioFiles
+ at: index
+ put: (
+ (TheStdioHandles at: index)
+ ifNil: [ ^self error:
moniker, ' is unavailable' ]
+ ifNotNil: [ :handle |
+ self
stdioStreamClass newForStdio
+
openOnHandle: handle
+ name:
moniker
+ forWrite:
forWrite ]) ]
+ !
Item was added:
+ ----- Method: FileStream class>>startUp: (in category 'system startup')
-----
+ startUp: resuming
+
+ resuming ifTrue: [
+ self voidStdioFiles.
+ [ TheStdioHandles := self stdioHandles ]
+ on: Error
+ do: [:ex|
+ TheStdioHandles isArray ifFalse: [
+ TheStdioHandles := Array new: 3 ] ]
]!
Item was added:
+ ----- Method: FileStream class>>stderr (in category 'stdio') -----
+ stderr
+
+ ^Stderr ifNil: [ Stderr := self standardIOStreamNamed: #stderr
forWrite: true ]!
Item was added:
+ ----- Method: FileStream class>>stdin (in category 'stdio') -----
+ stdin
+
+ ^Stdin ifNil: [ Stdin := self standardIOStreamNamed: #stdin
forWrite: false ]!
Item was added:
+ ----- Method: FileStream class>>stdioHandles (in category 'stdio') -----
+ stdioHandles
+ <primitive: 'primitiveFileStdioHandles' module: 'FilePlugin' error:
ec>
+ self primitiveFailed!
Item was added:
+ ----- Method: FileStream class>>stdioStreamClass (in category 'stdio')
-----
+ stdioStreamClass
+
+ ^self encodeAndDecodeStdioFiles
+ ifTrue: [ MultiByteFileStream ]
+ ifFalse: [ StandardFileStream ]!
Item was added:
+ ----- Method: FileStream class>>stdout (in category 'stdio') -----
+ stdout
+
+ ^Stdout ifNil: [ Stdout := self standardIOStreamNamed: #stdout
forWrite: true ]!
Item was added:
+ ----- Method: FileStream class>>updateStdioFiles (in category 'stdio')
-----
+ updateStdioFiles
+ "Make sure that all existing stdio files are instances of
#stdioStreamClass."
+
+ StdioFiles ifNil: [ ^self ].
+ Stdin := Stdout := Stderr := nil.
+ StdioFiles := StdioFiles collect: [ :file |
+ file ifNotNil: [
+ file class == self stdioStreamClass
+ ifTrue: [ file ]
+ ifFalse: [
+ self stdioStreamClass newForStdio
+ copyFrom: file;
+ yourself ] ] ]
+ !
Item was added:
+ ----- Method: FileStream class>>voidStdioFiles (in category 'stdio') -----
+ voidStdioFiles
+
+ Stdin := Stdout := Stderr := StdioFiles := nil!
Feb. 6, 2011
Re: [Pharo-project] Hudson build for Seaside too?
by Stéphane Ducasse
>> Since I seem to be on a symbolic version kick today, may I suggest that you use symbolic versions for Hudson:
>>
>> Gofer new
>> squeaksource: 'MetacelloRepository';
>> package: 'ConfigurationOfSeaside30';
>> load.
>>
>> ((Smalltalk at: #ConfigurationOfSeaside30) project version: #stable) load.
>>
>> when you get a chance ...
>
> Done.
>
>> the above expression can be used for all of your Hudson builds regardless of pharo version.
>
>
> use the same, but it loads then a different *stable* for each version?
yes at least this is the idea.
> and
>
>> ((Smalltalk at: #ConfigurationOfSeaside30) project version: #unstable) load.
>
>
> would load the latest code into e.g. 1.3?
may be #development or bleedingEdge
stef
Feb. 6, 2011