Yes, this is intentional: 'stream' is the raw low-level stream, 'latex'
the high-level encoded stream. The choice to which you send the output is
important. Changing it likely breaks the generation of valid LaTeX.
GRPharoUtf8CodecStream or better its abstract superclass should implement
#print:. I think this was discussed in the Seaside list recently and fixed,
but I might be wrong.
On Saturday, 24 September 2011, Tudor Girba <tudor(a)tudorgirba.com> wrote:
I am testing Pier 2 some more, and now I got a problem in the Latex
Specifically, I do not quite understand the difference between the
latex instance variable and the inherited stream one.
Take a look at the snippet below:
latex tab ... square: [ stream nextPutAll: 'width='; print:
((anInternalLink parameterAt: 'width' ifAbsent: [ 100 ]) asNumber / 100.0);
When executed on a book we have two instance variables:
- stream: instance of GRPharoUtf8CodecStream (inherited)
- latex: instance of BOLatexStream which wraps stream
Now, it so happens that GRPharoUtf8CodecStream does not understand print:,
method exists in BOLatexStream. I fixed the code by replacing
stream with latex in the above method, and it works.
But, there are still other places that use stream, and I think they should
the BOLatexStream instance instead. So, my question is: Is this
intentional? Or maybe should we actually simply override the setting of
stream and use that one for everything?
"Yesterday is a fact.
Tomorrow is a possibility.
Today is a challenge."
Magritte, Pier and Related Tools ...