jfitzell at gmail.com
Thu Jun 16 13:06:54 UTC 2011
The problem is that both #respond: causes the callback processing to
immediately halt so a response can be returned.
You can do other stuff in the #respond: block, which will of course happen
before the response is returned. You can also respond separately:
self requestContext response
document: (StandardFileStream readOnlyFileFullyNamed: fileName );
"some other stuff"
self requestContext respond.
However, if your #answer is in response to a #call: that won't work either,
since that will cause the continuation to be invoked and control flow will
return to the method that did the #call: (your response will still be
configured, but the code after the #call: will be executed, possibly
altering the response). In this case, you could possibly use #home on the
calling component to remove its delegations, but I'd question why you were
using #call:/#answer: at all.
If the #answer is in response to a #show: or is triggering an #onAnswer:
block in an embedded component, it should work fine to #answer inside the
Hope that's helpful.
2011/6/14 Milan Mimica <milan.mimica at gmail.com>
> I'm having trouble with page flow. At one point I need a component to issue
> a download of file and #answer back to the caller.
> I'm issuing a download using:
> self requestContext respond: [ :response |
> contentType: 'application/pdf';
> document: (StandardFileStream readOnlyFileFullyNamed: fileName );
> attachmentWithFileName: fileName
> After that, "self answer" doesn't seem to work. What can I do about it?
> Milan Mimica
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside