It seems like a couple things have broken (or, at the least, stopped behaving as they used to) since the freeform-patterned branch got merged back into trunk. For one, rend.Page.renderString() raises tracebacks. Ew. Second, something I haven't been able to figure out the cause of, method bindings that are part of a TypedInterface aren't being rendered with the proper values filled in. I've attached an example of what I mean; if you run this script with 'twistd -ony' using Nevow before the merge, the web form gets rendered with the appropriate values included. But after the merge, the forms appear blank. What gives? Oh, and if you run this with python instead of twistd, you'll see the traceback that rend.Page.renderString() is raising. Added bonus. :P -- Alex Levy WWW: http://mesozoic.geecs.org/ "Never let your sense of morals prevent you from doing what is right." -- Salvor Hardin, Isaac Asimov's _Foundation_
On Fri, 2004-05-07 at 06:25, Alex Levy wrote:
It seems like a couple things have broken (or, at the least, stopped behaving as they used to) since the freeform-patterned branch got merged back into trunk.
For one, rend.Page.renderString() raises tracebacks. Ew.
Second, something I haven't been able to figure out the cause of, method bindings that are part of a TypedInterface aren't being rendered with the proper values filled in.
I've attached an example of what I mean; if you run this script with 'twistd -ony' using Nevow before the merge, the web form gets rendered with the appropriate values included. But after the merge, the forms appear blank. What gives?
IIRC, autocallable methods have never been populated from the configurable object's data. You need to use form defaults for that, which would look something like ... def render_edit(self, ctx, data): defs = ctx.locate(iformless.IFormDefaults) defs.setDefault('someMethod.one', self.myObject.one) defs.setDefault('someMethod.two', self.myObject.two) ... etc ... Interestingly, setting the defaults as above prepopulates *both* forms. I think it should only populate the self.orginal form. To populate the self.myObject form I expected to need to set the default for the myobject.someMethod.(one|two|three) key.
Oh, and if you run this with python instead of twistd, you'll see the traceback that rend.Page.renderString() is raising. Added bonus. :P
-- __ / \__ Matt Goodall, Pollenation Internet Ltd \__/ \ w: http://www.pollenation.net __/ \__/ e: matt@pollenation.net / \__/ \ t: +44 (0)113 2252500 \__/ \__/ / \ Any views expressed are my own and do not necessarily \__/ reflect the views of my employer.
On Fri, 2004-05-07 at 06:25, Alex Levy wrote:
It seems like a couple things have broken (or, at the least, stopped behaving as they used to) since the freeform-patterned branch got merged back into trunk.
For one, rend.Page.renderString() raises tracebacks. Ew.
Second, something I haven't been able to figure out the cause of, method bindings that are part of a TypedInterface aren't being rendered with the proper values filled in.
I've attached an example of what I mean; if you run this script with 'twistd -ony' using Nevow before the merge, the web form gets rendered with the appropriate values included. But after the merge, the forms appear blank. What gives?
Oh, and if you run this with python instead of twistd, you'll see the traceback that rend.Page.renderString() is raising. Added bonus. :P
For reference, I added a couple of failing tests for renderString() this morning. Cheers, Matt -- Matt Goodall, Pollenation Internet Ltd w: http://www.pollenation.net e: matt@pollenation.net Any views expressed are my own and do not necessarily reflect the views of my employer.
On Fri, 2004-05-07 at 06:25, Alex Levy wrote:
It seems like a couple things have broken (or, at the least, stopped behaving as they used to) since the freeform-patterned branch got merged back into trunk.
For one, rend.Page.renderString() raises tracebacks. Ew.
For the record, the renderString() problem(s) should now be fixed in svn
trunk.
Cheers, Matt
--
Matt Goodall
On Mon, 17 May 2004 22:07:30 +0100, Matt Goodall
On Fri, 2004-05-07 at 06:25, Alex Levy wrote:
It seems like a couple things have broken (or, at the least, stopped behaving as they used to) since the freeform-patterned branch got merged back into trunk.
For one, rend.Page.renderString() raises tracebacks. Ew.
For the record, the renderString() problem(s) should now be fixed in svn trunk.
Yay! Thankyou, my RSS aggregator works again. Stephen
participants (3)
-
Alex Levy
-
Matt Goodall
-
stephen@thorne.id.au