[03:07:48] ** gbay has joined us [07:14:05] gbay is now known as gbay|slaving [07:16:54] ** vlado has joined us [07:30:44] ** etrepum has left IRC (wells.freenode.net irc.freenode.net) [07:30:44] ** vlado has left IRC (wells.freenode.net irc.freenode.net) [07:33:09] ** vlado has joined us [07:33:09] ** etrepum has joined us [07:39:01] ** jack-e has joined us [08:34:26] ** sremington has joined us [10:23:40] ** gpciceri has joined us [11:12:39] ** rdmurray has joined us [11:28:40] vlado is now known as vlado|away [11:52:48] ** pje has joined us [11:52:54] * pje waves [11:53:09] hey phillip :) [11:54:39] 'lo [13:07:10] ** vlado|away has left IRC (Read error: 60 (Operation timed out)) [13:47:44] pje: i have a question regarding peak.web .. do you have a minute ? [14:06:53] Sure. [14:07:29] i'm extending my little webdemo with a small form-framework [14:08:00] i use Components that im plement IWebPage to hook the machinery into the request-handling [14:08:40] within the components i want to provide some information to the next traversed objects [14:09:00] is there a way to "set some data in the request" or something similar ? [14:09:24] e.g. i choose a form based on some information and want the template be able to choose it and render it [14:10:07] There's a couple different ways. [14:10:26] i have an ugly hack now, using an IExtensibleRequest Adapter that stores the information in some __xx attr of the interaction [14:11:10] If you're doing peak.web.templates, then you can use the other argument. [14:11:52] Ah yes... here's what I mean... IDOMletState [14:12:11] Specifcally, the second parameter of IDOMletNode.renderFor() [14:12:57] it needs to be a more generic approach, cause i don't know if the target is a template or a IWebPage [14:12:58] Or of course you can provide things as properties from your decorators, and look them up that way. [14:13:44] Yes, but you can always make IDOMletNode your primary interface instead of IWebPage. [14:14:23] the decorators only exist while the interaction ? (i.e. are not reused) [14:15:01] Right, unless you make them sticky adapters, they are per-traversal adapters. [14:15:49] But if you want fine-grained control, you should use IDOMletState, and render off of IDOMletNode, since IDOMletNode is trivially adaptable to IWebPage. [14:16:36] ok .. i'll look into that .. (i'm trying to combine ian bickings formencode/validation with p.w.t) [14:16:37] Then, you can add arbitrary objects to a "state stack" that follows your rendering execution hierarchy, rather than component traversal hierarchy. [14:17:05] To add state, you just do something like: [14:17:33] newstate = MyState(state, write=state.write) [14:18:00] Where MyState is a subclass of DOMletState that adds whatever stuff you need, and 'state' is the IDOMletState you received in your renderFor() call. [14:18:25] You then pass 'newstate' to the child IDOMletNode's renderFor(). [14:18:49] Of course you'd have other params for your app specific data. [14:19:45] ok .. i'll try it that way .. thanks [14:26:04] ** hazmat has joined us [14:26:16] hey kapil :) [14:32:20] pje: one more thing: it would be nice if p.w.t's Resource-Loader and the Document would care about content_type set in a resources.ini [14:32:59] What do you mean? [14:33:23] for a file you can set content_type = "text/xml" in a resources.ini file [14:33:56] p.w.t's resource-loader + the renderFor of the Document do not care about a content_type spec in a resources.ini afaik [14:36:28] mime_type it is called in the FSResource Class [14:38:17] Ah. [14:38:22] But what would you do with it? [14:38:33] Oh, you mean it doesn't set a content-type header? [14:38:46] have 2 different extensions for p.w.t's and deliver html/xml/... from them [14:39:24] right [14:41:21] Hm. [14:41:41] this should probably only happen once ;-) [14:42:03] I guess I'd have to wrap the template in an object whose renderFor set the content type. [14:42:22] the IDomLetNode -> IWebPage Adapter ?? [14:42:58] Sort of, only it'd be a TemplateDocument->IWebPage adapter. [14:43:06] Or something like that. [14:43:15] right [14:43:58] Or just make TemplateDocument implement IWebPage directly. [16:09:13] ** gpciceri has left IRC ("Client exiting") [16:29:27] jack-e is now known as jack-e|away [16:29:29] cu [17:36:13] gbay|slaving is now known as gbay [17:39:06] ** sremington has left IRC ("Laugh while you can monkey boy!") [18:49:52] ** rdmurray has left IRC ("User disconnected") [18:53:07] ** gbay has left IRC ("It's not like I'm leaving or anything...") [19:16:08] ** sremington has joined us [19:38:13] ** hazmat has left IRC (Read error: 113 (No route to host)) [19:55:37] * pje waves [19:55:40] ** pje has left IRC ("Client exiting") [22:04:50] ** rdmurray has joined us [23:00:27] ** Maniac has joined us [23:08:55] * Maniac wonders how far jack-e|away is getting with peak.web