[BUG] ([closed] non-issue)

Larry Trutter ltrutter at onemain.com
Wed Jul 13 11:48:11 UTC 2005


This report is being closed because I could not successfully replicate this issue without more information.  

You are welcome to resubmit the issue to the Mantis database with any more information that you can to aid us in understanding and replicating the problem at http://bugs.impara.de/ .

thank you for your time,
Larry Trutter

Stéphane Ducasse wrote:

> hi all
>
> can someone help me here?
>
> I did the following
> |stream |
> stream := (MultiByteFileStream fileNamed: 'BD4TabsDelimited.txt').
> stream converter: MacRomanTextConverter new.
> self assert: (stream upTo: Character cr) =  '        Achille Talon     
> Greg        Pas de pitié pour Achille talon    13    1976     
> Dargaud    "sur la couverture ""une histoire du journal  
> tintin"""            '
>
> This is ok!
>
>
>
> Now I'm trying to use MultiByteBinaryOrTextStream as follow
>
> |stream |
> stream := MultiByteBinaryOrTextStream on: self  
> completeWithTabbingLinesWithAccents encoding: 'mac-roman'.
> self assert: (stream upTo:  Character cr) = ' '
>
> when I do
> stream contents I got '' while there is a collection...
>
> It seems that the stream once instantiated is at the end. (readLimit  
> is 0 when the instance is created)
>
> How can I say to the stream to be at the start. I tried reset,  
> resetAtStart without success
> when in an inspector I copy the writeLimit to the readLimit then  
> upTo: works perfectly.
>
> Is it a bug?
>
> I added
>
> MultiByteBinaryOrTextStream>>atStart
>
>     readLimit := writeLimit.
>     position := 0.
>
> and it works but this seems to me quite strange that I cannot open a  
> MultiByteBinaryOrTextStream
> in read and be at the beginning of the stream
>
> Stef
>
>
>
>
>
>




More information about the Squeak-dev mailing list