| *** CSWookie has joined #zope3-dev | 00:09 | |
| CSWookie | Is there a way to get second-best adaptation for some arguments? | 00:10 |
|---|---|---|
| *** elro has quit IRC | 00:37 | |
| benji | CSWookie: why do you want to do that? If it's because you want to do something like an adapter "super", then I can tell you how to do it (if I can find the last place I wrote that code) | 00:42 |
| CSWookie | benji: Pretty much. | 00:42 |
| benji | let me see if I can find it | 00:42 |
| CSWookie | benji: I want to write a traverser for our test stuff that is a generator. | 00:42 |
| CSWookie | benji: So that I can start a test by saying, I will open this in the browser. | 00:43 |
| CSWookie | And then step by step show the thing traversing through the parts of my code, and what it does. | 00:43 |
| *** jfroche has quit IRC | 01:07 | |
| benji | CSWookie: found what I was looking for, but don't think it'll help in your situation because it doesn't get the "second-best" adapter, but gets the most general adapter for a particular interface | 01:08 |
| CSWookie | Hah. Durn. | 01:09 |
| CSWookie | Well, I'd still like to see that code. Maybe it could be tweaked to get the second best. | 01:09 |
| benji | not really, here's what it's doing: say you have an adapter that can copy objects of a particular interface (say IA) and another that wants to be registered to copy IB but defer some or all of its implementation to the copier of IA | 01:12 |
| benji | in the __init__ of the IB copier, you could get the copier for an arbitrary object and pull out it's class to get the arbitrary adapter (this assumes the adapter is a class and not a different callable) | 01:13 |
| *** alecm has joined #zope3-dev | 01:14 | |
| benji | the code would be this: self.generic_adapter = IObjectCopier(object()).__class__ | 01:14 |
| benji | after writing that code I convinced Jim that we needed a facility to get the actual "super" adapter, I don't think he's implemented it though | 01:15 |
| CSWookie | I'm not sure I'm following why that works. | 01:17 |
| CSWookie | I don't know what an IB copier is either, so maybe that's why. | 01:18 |
| *** salfield_ is now known as salfield | 01:18 | |
| CSWookie | We are both defining the "super" adapter to be the adapter that would have taken place, had this adapter not been registered, correct? | 01:19 |
| benji | it'll work for any adapter, this one is just for adapters for copying objects | 01:19 |
| CSWookie | OK. | 01:19 |
| benji | yep | 01:19 |
| benji | my version is a hack though, it assumes two things: that the adapter is an instance and that the interface hierarchy is only two levels (that there is nothing between IA and IB) | 01:20 |
| CSWookie | Ah. | 01:20 |
| CSWookie | That's what I wasn't getting. | 01:20 |
| CSWookie | Hmm. | 01:20 |
| benji | if you're /really/ interested in this you could take a shot at adding the feature | 01:21 |
| CSWookie | Well, I would definitely like to have that. | 01:23 |
| CSWookie | I'd also like to have 2.5 support. | 01:24 |
| CSWookie | But both of those things look like things that are over my head to do right now. | 01:24 |
| *** harobed has quit IRC | 01:27 | |
| *** alecm has quit IRC | 01:27 | |
| *** yota has quit IRC | 01:44 | |
| *** WebMaven_ has quit IRC | 01:48 | |
| *** WebMaven_ has joined #zope3-dev | 01:49 | |
| *** lurker has quit IRC | 01:50 | |
| *** lurker has joined #zope3-dev | 01:50 | |
| *** greenman has joined #zope3-dev | 02:05 | |
| *** dobee has joined #zope3-dev | 02:16 | |
| *** jodok has quit IRC | 02:30 | |
| *** elro has joined #zope3-dev | 02:30 | |
| *** dobee has quit IRC | 02:30 | |
| *** reco has quit IRC | 02:42 | |
| *** lurker has quit IRC | 03:25 | |
| *** b52GM has quit IRC | 03:37 | |
| *** b52laptop has quit IRC | 03:37 | |
| *** WebMaven_ has quit IRC | 03:56 | |
| *** WebMaven_ has joined #zope3-dev | 04:03 | |
| *** sm has left #zope3-dev | 04:11 | |
| *** whit has joined #zope3-dev | 06:23 | |
| *** whit has quit IRC | 06:25 | |
| *** whit has joined #zope3-dev | 06:26 | |
| *** BjornT has joined #zope3-dev | 06:29 | |
| *** kali67 has joined #zope3-dev | 06:34 | |
| *** whit has quit IRC | 06:38 | |
| *** marianom has left #zope3-dev | 06:59 | |
| *** stub has joined #zope3-dev | 07:00 | |
| *** whit has joined #zope3-dev | 07:22 | |
| *** baijum has joined #zope3-dev | 07:29 | |
| *** stub has quit IRC | 07:40 | |
| *** harobed has joined #zope3-dev | 07:57 | |
| *** Aiste has joined #zope3-dev | 08:04 | |
| *** afd_ has joined #zope3-dev | 08:09 | |
| *** dobee has joined #zope3-dev | 08:12 | |
| *** sorin has joined #zope3-dev | 08:18 | |
| *** sorin is now known as sorindregan | 08:19 | |
| *** yvl has joined #zope3-dev | 08:20 | |
| *** dobee has quit IRC | 08:21 | |
| *** naro has joined #zope3-dev | 09:02 | |
| *** pelle_ has joined #zope3-dev | 09:02 | |
| *** harobed has quit IRC | 09:11 | |
| *** pelle_ has quit IRC | 09:15 | |
| *** schwendinger has joined #zope3-dev | 09:18 | |
| *** kali67 has quit IRC | 09:20 | |
| *** dobee has joined #zope3-dev | 09:23 | |
| *** whit has joined #zope3-dev | 09:26 | |
| *** dobee has quit IRC | 09:29 | |
| *** dobee has joined #zope3-dev | 09:33 | |
| *** whit has quit IRC | 09:38 | |
| *** stub has joined #zope3-dev | 09:41 | |
| *** jukart has joined #zope3-dev | 09:53 | |
| *** stub has quit IRC | 10:00 | |
| *** tarek has joined #zope3-dev | 10:01 | |
| *** stub has joined #zope3-dev | 10:03 | |
| *** jukart has quit IRC | 10:09 | |
| *** timte has joined #zope3-dev | 10:17 | |
| *** pelle_ has joined #zope3-dev | 10:23 | |
| *** d2m has joined #zope3-dev | 10:26 | |
| *** b52laptop has joined #zope3-dev | 10:29 | |
| *** b52GM has joined #zope3-dev | 10:30 | |
| *** yota has joined #zope3-dev | 10:30 | |
| *** bigkevmcd has joined #zope3-dev | 10:32 | |
| *** yvl has quit IRC | 10:41 | |
| *** dobee has quit IRC | 10:43 | |
| *** yvl has joined #zope3-dev | 10:50 | |
| *** afd_ has quit IRC | 10:51 | |
| *** jfroche has joined #zope3-dev | 10:54 | |
| *** Aiste has quit IRC | 11:15 | |
| *** lzdych has joined #zope3-dev | 11:23 | |
| *** benji has quit IRC | 11:26 | |
| *** jodok has joined #zope3-dev | 11:51 | |
| *** hellwolf has joined #zope3-dev | 11:51 | |
| *** hellwolf has left #zope3-dev | 11:52 | |
| *** Aiste has joined #zope3-dev | 12:08 | |
| *** ktwilight has joined #zope3-dev | 12:11 | |
| *** alga has joined #zope3-dev | 12:12 | |
| *** BjornT_ has joined #zope3-dev | 12:15 | |
| *** harobed has joined #zope3-dev | 12:21 | |
| *** ktwilight_ has quit IRC | 12:26 | |
| *** ghendi has joined #zope3-dev | 12:33 | |
| *** BjornT has quit IRC | 12:37 | |
| *** elro has joined #zope3-dev | 13:13 | |
| *** mkerrin has joined #zope3-dev | 13:13 | |
| *** Jell-O-Fishi has quit IRC | 13:27 | |
| *** ignas has joined #zope3-dev | 13:28 | |
| *** harobed_ has joined #zope3-dev | 13:30 | |
| *** BjornT_ has quit IRC | 13:38 | |
| *** dobee has joined #zope3-dev | 13:41 | |
| *** dunny has quit IRC | 13:42 | |
| *** elro has quit IRC | 13:49 | |
| *** BjornT has joined #zope3-dev | 13:57 | |
| *** stub has quit IRC | 14:11 | |
| *** stub has joined #zope3-dev | 14:11 | |
| *** jodok has quit IRC | 14:18 | |
| *** dobee has quit IRC | 14:36 | |
| *** dobee has joined #zope3-dev | 14:41 | |
| *** Newfie has joined #zope3-dev | 14:41 | |
| *** harobed_ has quit IRC | 14:55 | |
| *** grahal has joined #zope3-dev | 15:02 | |
| *** harobed has quit IRC | 15:09 | |
| *** harobed has joined #zope3-dev | 15:12 | |
| *** niemeyer has joined #zope3-dev | 15:28 | |
| *** CrippsFX|weekend is now known as CrippsFX | 16:05 | |
| CrippsFX | morning folks | 16:15 |
| *** pelle_ has quit IRC | 17:08 | |
| *** baijum has quit IRC | 17:12 | |
| *** foxmjay has joined #zope3-dev | 17:14 | |
| *** tonico has joined #zope3-dev | 17:27 | |
| *** yvl has quit IRC | 17:33 | |
| *** foxmjay has quit IRC | 17:43 | |
| *** lurker has joined #zope3-dev | 17:43 | |
| *** lurker has left #zope3-dev | 17:46 | |
| *** marianom has joined #zope3-dev | 17:48 | |
| *** philiKON has joined #zope3-dev | 17:49 | |
| CrippsFX | hey philiKON ... in the WC book, chapter 10, there's a section where we write the wc macros file, and then later refactor it for viewlets, but when I try to load it now it complains to me about self.template.macros[key] not being a subscriptable object ... is there something I missed that I have to change to get the new macros template working? | 17:58 |
| philiKON | the ZPT is likely not well-formed | 18:00 |
| CrippsFX | okay. I'll take another look at it, and compare it to yours then. | 18:00 |
| philiKON | or just copy the friggen template :) | 18:00 |
| CrippsFX | philiKON: *could* do, except I'm going by example and modelling a custom site after yours. | 18:02 |
| philiKON | ok | 18:03 |
| philiKON | well, run the template thru xmlint | 18:03 |
| CrippsFX | kk. | 18:03 |
| CrippsFX | philiKON: wow, cool. I didn't even know about that tool, but it did find some errors. Guess I should clean those up a bit :) | 18:04 |
| *** benji has joined #zope3-dev | 18:10 | |
| CrippsFX | hey benji | 18:10 |
| benji | hi | 18:10 |
| CrippsFX | how's it going? Enjoying your Memorial day weekend? | 18:11 |
| benji | yep | 18:11 |
| CrippsFX | philiKON: is it unusual for xmllint to not like the tal and metal namespaces? | 18:12 |
| CrippsFX | benji: have a beer for me, will ya? ;) | 18:12 |
| benji | How 'bout a sweet tea? <wink> | 18:13 |
| CrippsFX | hahaha. I'll settle for one of thyose if there's no beer on hand ;) | 18:13 |
| *** elro has joined #zope3-dev | 18:14 | |
| *** timte has quit IRC | 18:19 | |
| *** sorindregan has quit IRC | 18:23 | |
| *** schwendinger has quit IRC | 18:24 | |
| philiKON | CrippsFX: you need to declare the namesapces | 18:24 |
| philiKON | using xmlns:tal="..." | 18:25 |
| philiKON | i usually do that anyway | 18:25 |
| *** ghendi has quit IRC | 18:25 | |
| philiKON | the book shows it too | 18:25 |
| *** jfroche has quit IRC | 18:25 | |
| philiKON | imo the cost of having to type these is far smaller than the gain you can get from standard xml tools like xmlint or nxml-mode | 18:25 |
| CrippsFX | philiKON: yeah, they are defined as in (following your example): <metal:block xmlns="http://xml.zope.org/namespaces/metal" ... />" | 18:26 |
| philiKON | nope | 18:26 |
| philiKON | xmlns:metal="..." | 18:27 |
| CrippsFX | oops, yeah, that's what I have :P | 18:27 |
| CrippsFX | oops, no, that's not what I have. | 18:27 |
| CrippsFX | :P | 18:27 |
| * CrippsFX is a moron sometimes. | 18:27 | |
| CrippsFX | philiKON: score ... I fixed that, and realized that I had four other opening tags that were in the format of <directive ... /> and then closed again later. | 18:31 |
| *** BjornT_ has joined #zope3-dev | 18:31 | |
| CrippsFX | so, I've fixed that, and now I just have to fix my *other* problems :) | 18:32 |
| *** philiKON_ has joined #zope3-dev | 18:34 | |
| *** alecm has joined #zope3-dev | 18:42 | |
| *** rocky|away is now known as rocky | 18:42 | |
| *** philiKON has quit IRC | 18:48 | |
| *** greenman_ has joined #zope3-dev | 18:55 | |
| CrippsFX | I win. | 19:06 |
| *** mgedmin has joined #zope3-dev | 19:11 | |
| *** greenman has quit IRC | 19:13 | |
| *** lurker_ has joined #zope3-dev | 19:18 | |
| *** lurker_ has left #zope3-dev | 19:18 | |
| *** BjornT has quit IRC | 19:38 | |
| CrippsFX | philiKON_: out of curiousity, is there any reason why you decided to register viewlet css resources with the browser:viewlet directive instead of the browser:resource directive? Wouldn't they do the same thing, more or less? | 20:17 |
| *** ignas has quit IRC | 20:18 | |
| *** alecm has quit IRC | 20:20 | |
| *** alecm has joined #zope3-dev | 20:20 | |
| *** Aiste has quit IRC | 20:37 | |
| *** pelle_ has joined #zope3-dev | 21:04 | |
| *** RAMgarlic has joined #zope3-dev | 21:05 | |
| *** dobee has quit IRC | 21:05 | |
| *** ignas has joined #zope3-dev | 21:06 | |
| *** dobee has joined #zope3-dev | 21:12 | |
| *** mkerrin has quit IRC | 21:12 | |
| *** dobee has quit IRC | 21:20 | |
| *** Aiste has joined #zope3-dev | 21:35 | |
| *** afd_ has joined #zope3-dev | 21:35 | |
| *** stub has quit IRC | 21:37 | |
| *** afd__ has joined #zope3-dev | 21:39 | |
| *** jodok has joined #zope3-dev | 21:46 | |
| *** natea_ has joined #zope3-dev | 21:50 | |
| *** tonico has quit IRC | 21:54 | |
| *** afd_ has quit IRC | 21:56 | |
| *** foxmjay has joined #zope3-dev | 22:09 | |
| *** dobee has joined #zope3-dev | 22:12 | |
| *** Newfie has quit IRC | 22:19 | |
| *** natea_ has quit IRC | 22:22 | |
| xbeanx | CrippsFX: viewlets are not necessarily resources | 22:25 |
| *** natea_ has joined #zope3-dev | 22:25 | |
| xbeanx | resources and viewlets are essentially different | 22:25 |
| CrippsFX | xbeanx: yes, I'm aware, but when a resource for a viewlet is used, it's registered via the "viewlet" directive ... why not just use the "resource" directive and call the resource *from* the viewlet? | 22:26 |
| xbeanx | it makes interchanging the viewlet for another one more difficult | 22:27 |
| CrippsFX | hos so? | 22:27 |
| CrippsFX | *how | 22:27 |
| *** dobee has quit IRC | 22:29 | |
| ignas | you might want to use the viewlet in some other application | 22:29 |
| ignas | so having a viewlet that only depends on the viewlet manager or interfaces is better | 22:29 |
| CrippsFX | ignas: yes, but the viewlet will call the same resource regardless if it's registered under "viewlet" or registered under "resource" | 22:30 |
| ignas | than having a viewlet that has "you must register resource 'foo' if you want to use this viewlet" | 22:30 |
| CrippsFX | either way, the resource has to be registered. | 22:30 |
| ignas | CrippsFX: yes, but different sites have different resources | 22:30 |
| ignas | now if you want to use the same viewlet in more than 1 site | 22:30 |
| ignas | you will have to register the resource for all the sites, or you can just register it with the viewlet and it will just work | 22:31 |
| CrippsFX | ignas: right ... you'd have to change the viewlet code instead of just configuration code. | 22:31 |
| ignas | ? | 22:31 |
| CrippsFX | ignas: if the viewlet resource were registered under "resource" and you wanted to use a different resource on a different site, using the same viewlet, you would have to tweak the viewlet code instead of just registering a new resource under the "viewlet" directive, right? | 22:33 |
| ignas | maybe, though i was talking about the same resource even | 22:34 |
| ignas | different sites have different sets of resources iirc | 22:34 |
| ignas | so if you have foo.jpg registered in site 1 | 22:35 |
| ignas | it is not available in site 2 | 22:35 |
| xbeanx | or may not be the same foo.jpg | 22:35 |
| ignas | so if you want your viewlet in site 2 - you would have to register foo.jpg for site 2 as well (unless you are using the viewlet specific resource) | 22:35 |
| CrippsFX | ignas: yeah ... but names are always changeable (slash, inter-changable) because of the whole configuration thing. | 22:35 |
| CrippsFX | anyways ... my brain is toast. It's home time. Then nap time. | 22:36 |
| CrippsFX | I'll be back in 15 hours. Cheers :P | 22:36 |
| xbeanx | me too | 22:36 |
| *** xbeanx has quit IRC | 22:36 | |
| *** reco has joined #zope3-dev | 22:44 | |
| *** dunny has joined #zope3-dev | 22:51 | |
| *** benji has quit IRC | 22:51 | |
| *** dobee has joined #zope3-dev | 23:06 | |
| *** dobee has quit IRC | 23:09 | |
| *** lzdych has quit IRC | 23:11 | |
| *** natea_ has quit IRC | 23:15 | |
| *** mgedmin has quit IRC | 23:21 | |
| *** Aiste has quit IRC | 23:27 | |
| *** Aiste has joined #zope3-dev | 23:30 | |
| *** dobee has joined #zope3-dev | 23:30 | |
| *** foxmjay_ has joined #zope3-dev | 23:40 | |
| *** dunny has quit IRC | 23:40 | |
| *** foxmjay_ has quit IRC | 23:40 | |
| *** dobee has quit IRC | 23:42 | |
| *** naro has quit IRC | 23:53 | |
| *** afd__ has quit IRC | 23:55 | |
| *** kali67 has joined #zope3-dev | 23:58 | |
| *** grahal has quit IRC | 23:59 | |
Generated by irclog2html.py 4.0.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!