Hi Lukas,
Thanks for fixing the code.
Now, there is no error when exporting the zip file, but still the book.tex file contains
strange characters. I guess it is related to an encoding problem. Just open the file with
TextMate and the problem is quite apparent.
Cheers,
Doru
On 25 Sep 2011, at 11:27, Lukas Renggli wrote:
It looks like
BOZipView is out of date:
Yeah, this is all Seaside 2.8 code that has never been updated.
- it implements renderContentOn: but this is
never reached
Yeah, this is never reached. Override #respondUsing: instead.
- it misses the respondUsing: hook method that
seems to be the preferred way to generate a response
I tried to implement respondUsing: by copying
from renderContentOn::
BOZipView>>respondUsing: aResponse
| archive |
super respondUsing: aResponse.
aResponse
contentType: 'application/zip';
attachmentWithFileName: self book name , '.zip'.
archive := ZipArchive new.
self addLatexTo: archive; addFilesTo: archive.
archive writeTo: aResponse stream.
archive close
It seems to go in the right direction, but the issue is that GRPharoUtf8CodecStream does
not understand binary (a method needed by ZipArchive).
GRPharoUtf8CodecStream is a text stream by definition (hence the codec).
You have to put the response into binary mode using #binary, then you
should get a binary stream, not an codec stream.
Lukas
--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki