Re: I've found a bug.
[email protected] Tue, 19 Feb 2008 04:28:43 -0000
| Newsgroups | gmane.comp.python.quotient.dev |
|---|---|
| Message-ID | <20080219042843.21558.1966265524.divmod.xquotient.6574@joule.divmod.com> |
On 02:11 am, [email protected] wrote: >Wow! Wait. No context? Mean, no slots, patterns and other stuff? And no >data :(((( !!! This is not a sollution, sorry. I'm trying to render a >TreeView control. It is very deep and mutable. So I have to use data, >render sequence, pattern item and so on. You can do this all without the context. Consider your tree a nest of objects that are being rendered rather than a nest of renderers that are invoked with data. More importantly, Nevow itself is slowly getting rid of the context; it was an unfortunate implementation detail that has now polluted the design of many, many Nevow applications. Relying on your renderer's place in the page to get the right data (which is effectively what the context does) makes your code more fragile and harder to test. Even if this were not so, we would be looking at a way to replace it: among other things, it prevents us from making Nevow significantly faster. Our long-term goal for some future version of Nevow is to have an entire rendering system that does not use the context and can only render page.Element objects (or something similar); in the meanwhile, you should start looking into things like the renderer that JP linked to :). Don't worry, this change will not be a sudden surprise: we have too much code which uses the context, so there will be a long period where the old way of doing things still works.