Re: [Pharo-dev] Usage of stream

2015-05-16 Thread Sven Van Caekenberghe
To replace all X's in input.txt with Y's in output.txt, you can do: 'input.txt' asFileReference readStreamDo: [ :in | 'output.txt' asFileReference writeStreamDo: [ :out | [ in atEnd ] whileFalse: [ | ch | (ch := in read) = $X ifTrue: [ out nextPut: $Y ]

Re: [Pharo-dev] Usage of stream

2015-05-16 Thread valmy roi
that is my problem, replacing the character with another one, how can i do it? 2015-05-16 11:28 UTC+01:00, Sergio Fedi sergio.f...@gmail.com: Maybe you should open a stream reading the original file the open a writing stream for the copy file And reading from one, writing on the other,

Re: [Pharo-dev] Usage of stream

2015-05-16 Thread Sergio Fedi
Well, when retrieving some bytes from the read stream you will have them, temporarily, in a collection (OrderedCollection or Array I assume) With that you can use the messages from those collections: 'a3a' copyReplaceAll: '3' with: 'R' ​Which gives 'aRa'

Re: [Pharo-dev] Manifest class values - instance or class side

2015-05-16 Thread Sergio Fedi
RPackagepackageManifest Perhaps it should be filed as a bug? Strange thing is, I don't find senders of this method.

[Pharo-dev] [pharo-project/pharo-core] 64d18e: 50047

2015-05-16 Thread GitHub
Branch: refs/heads/5.0 Home: https://github.com/pharo-project/pharo-core Commit: 64d18e84d1ebbca37a353ddf618d7a4e6ec2ca31 https://github.com/pharo-project/pharo-core/commit/64d18e84d1ebbca37a353ddf618d7a4e6ec2ca31 Author: Jenkins Build Server bo...@pharo-project.org Date:

[Pharo-dev] [pharo-project/pharo-core]

2015-05-16 Thread GitHub
Branch: refs/tags/50047 Home: https://github.com/pharo-project/pharo-core

Re: [Pharo-dev] Usage of stream

2015-05-16 Thread Sergio Fedi
Do you have to modify the file? Create a new file with the modifications? Or get the file in memory but modified? On Sat, May 16, 2015 at 6:05 AM, Vincent BLONDEAU vincent.blond...@polytech-lille.net wrote: Hi, You can do it by using on a subclass of WriteStream peek and nextPut: methods.

Re: [Pharo-dev] Usage of stream

2015-05-16 Thread Vincent BLONDEAU
Hi, You can do it by using on a subclass of WriteStream peek and nextPut: methods. Or you can transform the stream into a Collection by using contents and do almost everything you want. Cheers, Vincent -Message d'origine- De : Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] De

Re: [Pharo-dev] Usage of stream

2015-05-16 Thread valmy roi
Yes, i have to create a new file fith the modifications. All what i've done for now is to copy the content of the original file in a stream and paste it in the new file, without any mofication Le 16 mai 2015 10:09, Sergio Fedi sergio.f...@gmail.com a écrit : Do you have to modify the file?

Re: [Pharo-dev] Usage of stream

2015-05-16 Thread Sergio Fedi
Maybe you should open a stream reading the original file the open a writing stream for the copy file And reading from one, writing on the other, replacing what you need in the intermediate collection of bytes/characters ​

Re: [Pharo-dev] Manifest class values - instance or class side

2015-05-16 Thread Kasper Osterbye
Sergio Fedi wrote ​What about this method? RPackagepackageManifest ^ (self classes detect: [ :each | each isManifest ] ifNone: [ TheManifestBuilder new createManifestNamed: name]) *new* Anyone know why does it create an instance of the Manifest instead of returning the class? (or why

Re: [Pharo-dev] FreeType fonts and underline/strikethrough emphasis

2015-05-16 Thread Nicolai Hess
2015-05-16 0:43 GMT+02:00 Alain Plantec alain.plan...@yahoo.com: Hello Nicolai, I’ve pushed your fixe into Rubric. It works as expected. thanks a lot!. Where ? What ? I did not fix rubric. :) My fix was for the BitBltDisplayScanner. Or do you mean this example. It is interesting, does

Re: [Pharo-dev] FreeType fonts and underline/strikethrough emphasis

2015-05-16 Thread Alain Plantec via Pharo-dev
---BeginMessage--- ah, :)) I guess I’ve tried your fix locally by changing RubCharacterScannerdisplayString: from: to: at: but without checking your test before the change. it was working so my conclusion was that your fix was successful. But in fact, your are right, Rubric renders underline and

Re: [Pharo-dev] Usage of stream

2015-05-16 Thread stepharo
If you want to convert character encoding, read the chapter of Zinc on encodings https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/ws/Zinc-Encoding-Meta/ Le 16/5/15 07:48, valmy roi a écrit : Hi everyone, I have a stream (read from a file) and i want to iterate through it in