[Seaside] state of the aubergine

Julian Fitzell julian@beta4.com
Mon, 22 Apr 2002 20:09:17 -0700


Nevin Pratt wrote:
> Avi Bryant wrote:
> 
>> On Mon, 22 Apr 2002, Nevin Pratt wrote:
>>
>>> Well, nobody dumps ALL of their images in just one directory.  They will
>>> always be scattered among a number of subordinate directories-- not just
>>> one.  Therefore, the mechanism used needs to be able to follow a path
>>> down from the docRoot.  And that doesn't seem to be supported (i.e.,
>>> <img src="@path/image.jpg"> won't work).
>>>
>>
>> It won't? Have you tried it?
>>
>>
>>
> 
> Yes.
> 
> Assuming a <img src="@path/foo.jpg"> example, where the docRoot of the 
> seaside app is set to: "http://www.test.com/", it looks like it is 
> trying to bind to a 'foo' instance variable, because it results in a 
> walkback with message <Could not find value for key "foo">.  This is 
> because of  an attempted <instVarNamed: 'foo'> lookup against my IATest 
> instance, which of course errors because there is no "foo" instance 
> variable.
> 
> But, if I instead just use <img src="@foo.jpg">, and instead put the 
> image path in the docRoot (i.e., change the docRoot to: 
> "http://www.test.com/path"), then it works like you said.
> 
> Nevin


Just out of interest, does it work with <img src="@images\foo.jpg"> ??

Obviously not a solution but it would confirm my suspicion of the problem.

As for the reason to have @foo.jpg as the ID, the reason is that if I 
don't want to manually create a binding, I can give the id @foo.jpg 
which makes the element dynamic (because it has an id) and the id 
("foo.jpg") is used by default as the name of the image (appended to the 
docRoot).  If you just put <img src="images/foo.jpg"> then it wouldn't 
get the docRoot added, and if you put <img src="@foo"> then you'd have 
to write a binding when the default could have sufficed.

Julian


-- 
julian@beta4.com
Beta4 Productions (http://www.beta4.com)