[Zope] Newbie: Why doesn't this work?

Michiel Toneman toneman@phil.uu.nl
Tue, 29 Feb 2000 10:44:21 +0100 (CET)


Hi All,

After struggling with Zope for two weeks now, I 
still can't figure some things out... From the 
namespaces HOWTO:

---------------------------------------------------------------
Example: The Let Tag

The Let tag let's you initialize and push a new name space onto
the name space stack. The arguments to the Let Tag are evaluated
and placed into the top most name space. For example:

<dtml-let x=5 y=7>
   <dtml-var x><dtml-var y>
</dtml-let>

The let tag creates a new name space, enters the integers x and y
into the new name space, and pushes the name space onto the stack.
----------------------------------------------------------------

Well, it just doesn't work! I get:

Error Type: KeyError
Error Value: 5

I've also tried 

<dtml-let x=5  
          y=7>
<dtml-var x><dtml-var y>
</dtml-let>

just to be sure...


Also from the namespaces howto:

----------------------------------------------------------------------
Example: The In Tag

A common sight in DTML is iterating over the contents of a
Folder. Create a folder called MyFolder and a DTML Method called
MyMethod containing the following:

<dtml-in objectValues>
   <dtml-var id>
</dtml-in>

Before entering the block, id was bound to MyFolder. When the block
is entered, a new name space is popped onto the name space stack. The
new name space contains the name space of the sequence-item
in the tag. Because new name spaces override old ones, the new
'sequence-item's id attribute is printed in our example instead
of MyFolder.

DTML tags push and pop name spaces onto the stack. Some DTML tags,
like and , do not change the name space at all, but , and modify
the name space stack in their own way.

The tag pushes the current sequence-item onto the name space stack
and then pops it off the stack when the end of the tag is reached. In
each iteration through the sequence objectValues, the id of each
item in the sequence is rendered
----------------------------------------------------------------------

This doesn't give me anything (yes, there are things in a folder below)

So what am I doing wrong, am i a user=id10t or is something seriously
screwy with Zope? I can get a lot of stuff to work, but it's all slow 
trial and error, because I can't figure out the logic (and apparently 
neither could the namespaces HOWTO author :( )

Please help,

Michiel Toneman

-- 
From a Sun Microsystems bug report (#4102680):
 "Workaround: don't pound on the mouse like a wild monkey."