Hi. In the interface IQ there is a keyed method but it seems that this is not implemented. What about it? It is documented also in stan.py (where there are some other special stuff like remember). By the way: what's the difference, say, beetwen ctx.fillSlots(...) and inevow.IQ(ctx).fillSlots(...) ? Thanks Manlio Perillo
On Tue, 25 Jul 2006 12:51:30 +0200, Manlio Perillo
Hi.
In the interface IQ there is a keyed method but it seems that this is not implemented. What about it?
It looks like a very strange operation to me. It should probably be removed from the interface.
It is documented also in stan.py (where there are some other special stuff like remember).
It is? I can't see any references to it except for on the IQ definition.
By the way: what's the difference, say, beetwen ctx.fillSlots(...) and inevow.IQ(ctx).fillSlots(...) ?
Not a lot. Neither should be used, though. Use tag.fillSlots(...) instead. Jean-Paul
Jean-Paul Calderone ha scritto:
On Tue, 25 Jul 2006 12:51:30 +0200, Manlio Perillo
wrote: Hi.
In the interface IQ there is a keyed method but it seems that this is not implemented. What about it?
It looks like a very strange operation to me. It should probably be removed from the interface.
It is not the only strange thing in Nevow source code ;-).
It is documented also in stan.py (where there are some other special stuff like remember).
It is? I can't see any references to it except for on the IQ definition.
nevow.stan.Tag def __call__(self, **kw): """Change attributes of this tag. This is implemented using __call__ because it then allows the natural syntax:: table(width="100%", height="50%", border="1") Attributes may be 'invisible' tag instances (so that C{a(href=invisible(data="foo", render=myhrefrenderer))} works), strings, functions, or any other object which has a registered flattener. If the attribute is a python keyword, such as 'class', you can add an underscore to the name, like 'class_'. A few magic attributes have values other than these, as they are not serialized for output but rather have special purposes of their own: - data: The value is saved on the context stack and passed to render functions. - render: A function to call that may modify the tag in any way desired. - remember: Remember the value on the context stack with context.remember(value) for later lookup with context.locate() - pattern: Value should be a key that can later be used to locate this tag with context.patternGenerator() or context.allPatterns() - key: A string used to give the node a unique label. This is automatically namespaced, so in C{span(key="foo")[span(key="bar")]} the inner span actually has a key of 'foo.bar'. The key is intended for use as e.g. an html 'id' attribute, but will is not automatically output. - macro - A function which will be called once in the lifetime of the template, when the template is loaded. The return result from this function will replace this Tag in the template. """
By the way: what's the difference, say, beetwen ctx.fillSlots(...) and inevow.IQ(ctx).fillSlots(...) ?
Not a lot.
An overhead for the adaptation?
Neither should be used, though. Use tag.fillSlots(...) instead.
Right, thanks. But it is strange: why I do not get deprecation warnings? Thanks and regards Manlio Perillo
participants (2)
-
Jean-Paul Calderone
-
Manlio Perillo