Frank Burkhardt wrote:

On Tue, Dec 13, 2005 at 02:02:05PM +0100, Andreas Elvers wrote:

what the rationale of @@ anyway ? I've searched for a definition for
this in the Developer Handbook and elsewhere but it's hard to search
for @@ and view.

@@ marks a given path component explicitely as a view of the previous object.

Example:

http://zopeserver/contents.html
Could mean either "The object named 'contents.html' in the root folder" or
(if there is no such object) "The 'contents.html' view (List of contained
objects) of the root folder" - the object is preferred.

http://zopeserver/@@contents.html

Will always display the list of contained objects of the root folder - no matter
if there's a object 'contents.html' or not.

Hmm, but the '@@' is optional, as I can leave it off and still get the contents.html view if there is no object named contents.html in that folder.

This would seem to confuse developers, as if there IS an accidental collision of an item name with a view that is unknown to the developer, it will return the view out of nowhere.

Shouldn't the '@@' should be *required* on views to avoid this ambiguity?

-Jeff

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to