Hi Nick,
I don't like the solution that looks for the $. It assumes that there
are only dots in resources (which is not necessarily the case).
Why don't you create the image in your component through a correct
context? Something along ...
html image src: (self context structure: aImageResource) url
Not sure if I recall the exact API.
Lukas
On 18 May 2011 20:03, Nick Ager <nick.ager(a)gmail.com> wrote:
The change doesn't require the "random
refactoring" I feared.
Assuming others think this is a reasonable idea, a problem arises in that
WARequest doesn't implement #mimeType. I'd propose
refactoring WAExternalFileLibrary>>#mimetypeForRequest: and
WAFileLibrary>>#mimetypeFor:
Does that seem a reasonable course of action?
Instead I implement
PRPierFrame>>#isFileRequest
| path |
path := self requestContext request url path.
^ (path notEmpty and: [ path last includes: $. ])
and modify PRPierFrame>>#notFound to read:
notFound
"This method is called whenever the current request cannot be resolved to a
structure."
self isFileRequest ifTrue: [ self requestContext respond: [: response |
response notFound ] ].
self context: (self context
structure: self context root
view: IZNotFoundView)
Anyone think this is a bad idea? If not I'll check it in.
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki