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): ...@@ -205,12 +205,12 @@ class METALCompiler(DOMVisitor):
block = self.popProgram() block = self.popProgram()
self.emit("defineSlot", slotName, block) self.emit("defineSlot", slotName, block)
return return
slotName = node.getAttributeNS(ZOPE_METAL_NS, "use-slot") slotName = node.getAttributeNS(ZOPE_METAL_NS, "fill-slot")
if slotName: if slotName:
self.pushProgram() self.pushProgram()
self.compileElement(node) self.compileElement(node)
block = self.popProgram() block = self.popProgram()
self.emit("useSlot", slotName, block) self.emit("fillSlot", slotName, block)
return return
self.compileElement(node) self.compileElement(node)
......
...@@ -200,7 +200,7 @@ class TALInterpreter: ...@@ -200,7 +200,7 @@ class TALInterpreter:
self.interpret(macro) self.interpret(macro)
self.slots, self.inMacro = save self.slots, self.inMacro = save
def do_useSlot(self, slotName, program): def do_fillSlot(self, slotName, program):
self.interpret(program) self.interpret(program)
def do_defineSlot(self, slotName, program): def do_defineSlot(self, slotName, program):
......
...@@ -344,7 +344,7 @@ def _macroVisitor(node, macroIndex, __elementNodeType=Node.ELEMENT_NODE): ...@@ -344,7 +344,7 @@ def _macroVisitor(node, macroIndex, __elementNodeType=Node.ELEMENT_NODE):
def slotIndexer(rootNode): 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, ...}. The dictionary will have the form {slotName: node, ...}.
""" """
...@@ -354,7 +354,7 @@ def slotIndexer(rootNode): ...@@ -354,7 +354,7 @@ def slotIndexer(rootNode):
def _slotVisitor(node, slotIndex, __elementNodeType=Node.ELEMENT_NODE): def _slotVisitor(node, slotIndex, __elementNodeType=Node.ELEMENT_NODE):
# Internal routine to efficiently recurse down the tree of elements # 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 slotName:
if slotIndex.has_key(slotName): if slotIndex.has_key(slotName):
print ("Duplicate slot definition: %s in <%s>" % print ("Duplicate slot definition: %s in <%s>" %
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<p m:define-slot="whoops">define-slot</p> <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> </body>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</tr> </tr>
<tr> <tr>
<td>Bottom left</td> <td>Bottom left</td>
<td><span m:use-slot="bottomRight"> <td><span m:fill-slot="bottomRight">
<h1>Some headline</h1> <h1>Some headline</h1>
<p>This is the real contents of the bottom right slot.</p> <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. <p>It is supposed to contain a lot of text. Blah, blah, blab.
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<p m:define-slot="whoops">define-slot</p> <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> </body>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- macro use with slots --> <!-- macro use with slots -->
<tr> <tr>
<td> <td>
<span m:use-slot="bottomRight"> <span m:fill-slot="bottomRight">
<h1>Some headline</h1> <h1>Some headline</h1>
<p>This is the real contents of the bottom right slot.</p> <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. <p>It is supposed to contain a lot of text. Blah, blah, blab.
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<p m:define-slot="whoops">define-slot</p> <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> </body>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</tr> </tr>
<tr> <tr>
<td>Bottom left</td> <td>Bottom left</td>
<td><span m:use-slot="bottomRight"> <td><span m:fill-slot="bottomRight">
<h1>Some headline</h1> <h1>Some headline</h1>
<p>This is the real contents of the bottom right slot.</p> <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. <p>It is supposed to contain a lot of text. Blah, blah, blab.
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<p m:define-slot="whoops">define-slot</p> <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> </body>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- macro use with slots --> <!-- macro use with slots -->
<tr> <tr>
<td> <td>
<span m:use-slot="bottomRight"> <span m:fill-slot="bottomRight">
<h1>Some headline</h1> <h1>Some headline</h1>
<p>This is the real contents of the bottom right slot.</p> <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. <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