Commit 877cea94 authored by Guido van Rossum's avatar Guido van Rossum

Oops. I used "use-slot", but should have used "fill-slot".

parent b4581536
......@@ -205,12 +205,12 @@ class METALCompiler(DOMVisitor):
block = self.popProgram()
self.emit("defineSlot", slotName, block)
return
slotName = node.getAttributeNS(ZOPE_METAL_NS, "use-slot")
slotName = node.getAttributeNS(ZOPE_METAL_NS, "fill-slot")
if slotName:
self.pushProgram()
self.compileElement(node)
block = self.popProgram()
self.emit("useSlot", slotName, block)
self.emit("fillSlot", slotName, block)
return
self.compileElement(node)
......
......@@ -200,7 +200,7 @@ class TALInterpreter:
self.interpret(macro)
self.slots, self.inMacro = save
def do_useSlot(self, slotName, program):
def do_fillSlot(self, slotName, program):
self.interpret(program)
def do_defineSlot(self, slotName, program):
......
......@@ -344,7 +344,7 @@ def _macroVisitor(node, macroIndex, __elementNodeType=Node.ELEMENT_NODE):
def slotIndexer(rootNode):
"""
Return a dictionary containing all use-slot nodes in a subtree.
Return a dictionary containing all fill-slot nodes in a subtree.
The dictionary will have the form {slotName: node, ...}.
"""
......@@ -354,7 +354,7 @@ def slotIndexer(rootNode):
def _slotVisitor(node, slotIndex, __elementNodeType=Node.ELEMENT_NODE):
# Internal routine to efficiently recurse down the tree of elements
slotName = node.getAttributeNS(ZOPE_METAL_NS, "use-slot")
slotName = node.getAttributeNS(ZOPE_METAL_NS, "fill-slot")
if slotName:
if slotIndex.has_key(slotName):
print ("Duplicate slot definition: %s in <%s>" %
......
......@@ -33,7 +33,7 @@
<p m:define-slot="whoops">define-slot</p>
<p m:use-slot="whoops">use-slot</p>
<p m:fill-slot="whoops">fill-slot</p>
</body>
......
......@@ -7,7 +7,7 @@
</tr>
<tr>
<td>Bottom left</td>
<td><span m:use-slot="bottomRight">
<td><span m:fill-slot="bottomRight">
<h1>Some headline</h1>
<p>This is the real contents of the bottom right slot.</p>
<p>It is supposed to contain a lot of text. Blah, blah, blab.
......
......@@ -20,7 +20,7 @@
<p m:define-slot="whoops">define-slot</p>
<p m:use-slot="whoops">use-slot</p>
<p m:fill-slot="whoops">fill-slot</p>
</body>
......
......@@ -3,7 +3,7 @@
<!-- macro use with slots -->
<tr>
<td>
<span m:use-slot="bottomRight">
<span m:fill-slot="bottomRight">
<h1>Some headline</h1>
<p>This is the real contents of the bottom right slot.</p>
<p>It is supposed to contain a lot of text. Blah, blah, blab.
......
......@@ -33,7 +33,7 @@
<p m:define-slot="whoops">define-slot</p>
<p m:use-slot="whoops">use-slot</p>
<p m:fill-slot="whoops">fill-slot</p>
</body>
......
......@@ -7,7 +7,7 @@
</tr>
<tr>
<td>Bottom left</td>
<td><span m:use-slot="bottomRight">
<td><span m:fill-slot="bottomRight">
<h1>Some headline</h1>
<p>This is the real contents of the bottom right slot.</p>
<p>It is supposed to contain a lot of text. Blah, blah, blab.
......
......@@ -20,7 +20,7 @@
<p m:define-slot="whoops">define-slot</p>
<p m:use-slot="whoops">use-slot</p>
<p m:fill-slot="whoops">fill-slot</p>
</body>
......
......@@ -3,7 +3,7 @@
<!-- macro use with slots -->
<tr>
<td>
<span m:use-slot="bottomRight">
<span m:fill-slot="bottomRight">
<h1>Some headline</h1>
<p>This is the real contents of the bottom right slot.</p>
<p>It is supposed to contain a lot of text. Blah, blah, blab.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment