On 2 août 07, at 15:37, stéphane ducasse wrote:
>
> On 2 août 07, at 15:31, Michael Rueger wrote:
>
>> stéphane ducasse wrote:
>>> Hi Mike
>>> we are heroically trying to clean Stream hierarchy (in fact
>>> making sure that the new and sexy one that damien is writing can
>>> be plugged in).
>>> We are reading
>>> PositionableStream>>pushBack: aString
>>> "Compatibility with SocketStreams"
>>> self skip: aString size negated
>>> and it seems to me that pushBack argument is not good. It should
>>> not be a string but a number since
>>> it never take care of pushing back different elements in the
>>> stream but just moving the cursor of the stream.
>>
>> Yes, but...
>> On a SocketStream we can't position the cursor, once the
>> characters are read they are no longer in the stream as there is
>> no underlying collection. The buffer doesn't count, as the content
>> can be replaced at any time during read or write.
>
> So? I'm confused :)
> Do you need the argument or just its size?
>>
>>> Do you know if the method pushBack on the XMLTokenizer is ever used?
>>
>> It's used when parsing and resolving entity definitions.
>
>
> I put a breakpoint on XMLTokenizer>>pushBack: and run XMLDOMParser
> addressBookXMLWithDTD
> but I was not stopped.
>
> While unpeek is calling the PositionableStream>>pushBack: via
> unpeek. I could not see where XMLTokenizer>>pushBack: is invoked.
>
>
> unpeek
>
> peekChar
> ifNotNil: [
> self stream pushBack: (String with: peekChar).
> peekChar _ nil]
>
> Thanks for your fast answer.
>
> stef
>