[Zope] Is Zope syntax inconsistent ?

Richard Moon richard@dcs.co.uk
Fri, 10 Mar 2000 14:28:02 +0000


Thanks for solving the immediate problem Phil - another UK Zopista - 
there's a few of you out there ! I think I've had help from all of you in 
turn :-)

However I think this reveals a basic problem with the syntax which is 
causing me grief and presumably there are others like me out there.

I would expect an object to behave consistently wherever it was used - so 
if it renders/returns/evaluates to 'zope' inside a dtml-var I would expect 
it equally to render/return/evaluate to 'zope' inside a dtml-if.

If it doesn't then surely we have an inconsistent syntax. How do we know 
how any object is going to behave inside a dtml tag ?

Any comments ?


At 13:08 10/03/00 +0000, you wrote:
>Richard,
>
>The equality check on AUTHENTICATED_USER will always fail because your
>comparing an object with a string.
>
>You need soemthiong more like :
>
><dtml-if expr="AUTHENTICATED_USER.getUserName()=='zope'">
>
>hth
>
>Phil
>phil.harris@zope.co.uk
>
>
>----- Original Message -----
>From: "Richard Moon" <richard@dcs.co.uk>
>To: <zope@zope.org>
>Sent: Friday, March 10, 2000 9:13 AM
>Subject: [Zope] Is Zope syntax inconsistent ?
>
>
> > I've hit the 'Zope Wall' again ! Can anyone explain why
> >
> > <dtml-if expr="AUTHENTICATED_USER=='zope'">
> > ZOPE !
> > <dtml-else>
> > NOT ZOPE !
> > </dtml-if>
> > <dtml-var AUTHENTICATED_USER>
> > <br>
> >
> > Displays
> >
> > NOT ZOPE ! zope
> >
> > While this
> > <dtml-if expr="tune_id=='Reel'">
> > REEL !
> > <dtml-else>
> > NOT REEL !
> > </dtml-if>
> > <dtml-var tune_id>
> >
> > Displays
> >
> > REEL ! reel
> >
> > Which is what I expected !
> >
> >
> > Richard Moon
> > richard@dcs.co.uk
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> >
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>


Richard Moon
richard@dcs.co.uk