IRC log of #zope3-dev for Monday, 2007-05-28

*** CSWookie has joined #zope3-dev00:09
CSWookieIs there a way to get second-best adaptation for some arguments?00:10
*** elro has quit IRC00:37
benjiCSWookie: 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
CSWookiebenji: Pretty much.00:42
benjilet me see if I can find it00:42
CSWookiebenji: I want to write a traverser for our test stuff that is a generator.00:42
CSWookiebenji: So that I can start a test by saying, I will open this in the browser.00:43
CSWookieAnd then step by step show the thing traversing through the parts of my code, and what it does.00:43
*** jfroche has quit IRC01:07
benjiCSWookie: 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 interface01:08
CSWookieHah.  Durn.01:09
CSWookieWell, I'd still like to see that code.  Maybe it could be tweaked to get the second best.01:09
benjinot 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 IA01:12
benjiin 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-dev01:14
benjithe code would be this: self.generic_adapter = IObjectCopier(object()).__class__01:14
benjiafter 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 though01:15
CSWookieI'm not sure I'm following why that works.01:17
CSWookieI don't know what an IB copier is either, so maybe that's why.01:18
*** salfield_ is now known as salfield01:18
CSWookieWe are both defining the "super" adapter to be the adapter that would have taken place, had this adapter not been registered, correct?01:19
benjiit'll work for any adapter, this one is just for adapters for copying objects01:19
benjimy 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
CSWookieThat's what I wasn't getting.01:20
benjiif you're /really/ interested in this you could take a shot at adding the feature01:21
CSWookieWell, I would definitely like to have that.01:23
CSWookieI'd also like to have 2.5 support.01:24
CSWookieBut both of those things look like things that are over my head to do right now.01:24
*** harobed has quit IRC01:27
*** alecm has quit IRC01:27
*** yota has quit IRC01:44
*** WebMaven_ has quit IRC01:48
*** WebMaven_ has joined #zope3-dev01:49
*** lurker has quit IRC01:50
*** lurker has joined #zope3-dev01:50
*** greenman has joined #zope3-dev02:05
*** dobee has joined #zope3-dev02:16
*** jodok has quit IRC02:30
*** elro has joined #zope3-dev02:30
*** dobee has quit IRC02:30
*** reco has quit IRC02:42
*** lurker has quit IRC03:25
*** b52GM has quit IRC03:37
*** b52laptop has quit IRC03:37
*** WebMaven_ has quit IRC03:56
*** WebMaven_ has joined #zope3-dev04:03
*** sm has left #zope3-dev04:11
*** whit has joined #zope3-dev06:23
*** whit has quit IRC06:25
*** whit has joined #zope3-dev06:26
*** BjornT has joined #zope3-dev06:29
*** kali67 has joined #zope3-dev06:34
*** whit has quit IRC06:38
*** marianom has left #zope3-dev06:59
*** stub has joined #zope3-dev07:00
*** whit has joined #zope3-dev07:22
*** baijum has joined #zope3-dev07:29
*** stub has quit IRC07:40
*** harobed has joined #zope3-dev07:57
*** Aiste has joined #zope3-dev08:04
*** afd_ has joined #zope3-dev08:09
*** dobee has joined #zope3-dev08:12
*** sorin has joined #zope3-dev08:18
*** sorin is now known as sorindregan08:19
*** yvl has joined #zope3-dev08:20
*** dobee has quit IRC08:21
*** naro has joined #zope3-dev09:02
*** pelle_ has joined #zope3-dev09:02
*** harobed has quit IRC09:11
*** pelle_ has quit IRC09:15
*** schwendinger has joined #zope3-dev09:18
*** kali67 has quit IRC09:20
*** dobee has joined #zope3-dev09:23
*** whit has joined #zope3-dev09:26
*** dobee has quit IRC09:29
*** dobee has joined #zope3-dev09:33
*** whit has quit IRC09:38
*** stub has joined #zope3-dev09:41
*** jukart has joined #zope3-dev09:53
*** stub has quit IRC10:00
*** tarek has joined #zope3-dev10:01
*** stub has joined #zope3-dev10:03
*** jukart has quit IRC10:09
*** timte has joined #zope3-dev10:17
*** pelle_ has joined #zope3-dev10:23
*** d2m has joined #zope3-dev10:26
*** b52laptop has joined #zope3-dev10:29
*** b52GM has joined #zope3-dev10:30
*** yota has joined #zope3-dev10:30
*** bigkevmcd has joined #zope3-dev10:32
*** yvl has quit IRC10:41
*** dobee has quit IRC10:43
*** yvl has joined #zope3-dev10:50
*** afd_ has quit IRC10:51
*** jfroche has joined #zope3-dev10:54
*** Aiste has quit IRC11:15
*** lzdych has joined #zope3-dev11:23
*** benji has quit IRC11:26
*** jodok has joined #zope3-dev11:51
*** hellwolf has joined #zope3-dev11:51
*** hellwolf has left #zope3-dev11:52
*** Aiste has joined #zope3-dev12:08
*** ktwilight has joined #zope3-dev12:11
*** alga has joined #zope3-dev12:12
*** BjornT_ has joined #zope3-dev12:15
*** harobed has joined #zope3-dev12:21
*** ktwilight_ has quit IRC12:26
*** ghendi has joined #zope3-dev12:33
*** BjornT has quit IRC12:37
*** elro has joined #zope3-dev13:13
*** mkerrin has joined #zope3-dev13:13
*** Jell-O-Fishi has quit IRC13:27
*** ignas has joined #zope3-dev13:28
*** harobed_ has joined #zope3-dev13:30
*** BjornT_ has quit IRC13:38
*** dobee has joined #zope3-dev13:41
*** dunny has quit IRC13:42
*** elro has quit IRC13:49
*** BjornT has joined #zope3-dev13:57
*** stub has quit IRC14:11
*** stub has joined #zope3-dev14:11
*** jodok has quit IRC14:18
*** dobee has quit IRC14:36
*** dobee has joined #zope3-dev14:41
*** Newfie has joined #zope3-dev14:41
*** harobed_ has quit IRC14:55
*** grahal has joined #zope3-dev15:02
*** harobed has quit IRC15:09
*** harobed has joined #zope3-dev15:12
*** niemeyer has joined #zope3-dev15:28
*** CrippsFX|weekend is now known as CrippsFX16:05
CrippsFXmorning folks16:15
*** pelle_ has quit IRC17:08
*** baijum has quit IRC17:12
*** foxmjay has joined #zope3-dev17:14
*** tonico has joined #zope3-dev17:27
*** yvl has quit IRC17:33
*** foxmjay has quit IRC17:43
*** lurker has joined #zope3-dev17:43
*** lurker has left #zope3-dev17:46
*** marianom has joined #zope3-dev17:48
*** philiKON has joined #zope3-dev17:49
CrippsFXhey 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
philiKONthe ZPT is likely not well-formed18:00
CrippsFXokay. I'll take another look at it, and compare it  to yours then.18:00
philiKONor just copy the friggen template :)18:00
CrippsFXphiliKON: *could* do, except I'm going by example and modelling a custom site after yours.18:02
philiKONwell, run the template thru xmlint18:03
CrippsFXphiliKON: 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-dev18:10
CrippsFXhey benji18:10
CrippsFXhow's it going? Enjoying your Memorial day weekend?18:11
CrippsFXphiliKON: is it unusual for xmllint to not like the tal and metal namespaces?18:12
CrippsFXbenji: have a beer for me, will ya? ;)18:12
benjiHow 'bout a sweet tea? <wink>18:13
CrippsFXhahaha. I'll settle for one of thyose if there's no beer on hand ;)18:13
*** elro has joined #zope3-dev18:14
*** timte has quit IRC18:19
*** sorindregan has quit IRC18:23
*** schwendinger has quit IRC18:24
philiKONCrippsFX: you need to declare the namesapces18:24
philiKONusing xmlns:tal="..."18:25
philiKONi usually do that anyway18:25
*** ghendi has quit IRC18:25
philiKONthe book shows it too18:25
*** jfroche has quit IRC18:25
philiKONimo the cost of having to type these is far smaller than the gain you can get from standard xml tools like xmlint or nxml-mode18:25
CrippsFXphiliKON:  yeah, they are defined as in (following your example): <metal:block xmlns="" ... />"18:26
CrippsFXoops, yeah, that's what I have :P18:27
CrippsFXoops, no, that's not what I have.18:27
* CrippsFX is a moron sometimes.18:27
CrippsFXphiliKON: 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-dev18:31
CrippsFXso, I've fixed that, and now I just have to fix my *other* problems :)18:32
*** philiKON_ has joined #zope3-dev18:34
*** alecm has joined #zope3-dev18:42
*** rocky|away is now known as rocky18:42
*** philiKON has quit IRC18:48
*** greenman_ has joined #zope3-dev18:55
CrippsFXI win.19:06
*** mgedmin has joined #zope3-dev19:11
*** greenman has quit IRC19:13
*** lurker_ has joined #zope3-dev19:18
*** lurker_ has left #zope3-dev19:18
*** BjornT has quit IRC19:38
CrippsFXphiliKON_: 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 IRC20:18
*** alecm has quit IRC20:20
*** alecm has joined #zope3-dev20:20
*** Aiste has quit IRC20:37
*** pelle_ has joined #zope3-dev21:04
*** RAMgarlic has joined #zope3-dev21:05
*** dobee has quit IRC21:05
*** ignas has joined #zope3-dev21:06
*** dobee has joined #zope3-dev21:12
*** mkerrin has quit IRC21:12
*** dobee has quit IRC21:20
*** Aiste has joined #zope3-dev21:35
*** afd_ has joined #zope3-dev21:35
*** stub has quit IRC21:37
*** afd__ has joined #zope3-dev21:39
*** jodok has joined #zope3-dev21:46
*** natea_ has joined #zope3-dev21:50
*** tonico has quit IRC21:54
*** afd_ has quit IRC21:56
*** foxmjay has joined #zope3-dev22:09
*** dobee has joined #zope3-dev22:12
*** Newfie has quit IRC22:19
*** natea_ has quit IRC22:22
xbeanxCrippsFX: viewlets are not necessarily resources22:25
*** natea_ has joined #zope3-dev22:25
xbeanxresources and viewlets are essentially different22:25
CrippsFXxbeanx: 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
xbeanxit makes interchanging the viewlet for another one more difficult22:27
CrippsFXhos so?22:27
*** dobee has quit IRC22:29
ignasyou might want to use the viewlet in some other application22:29
ignasso having a viewlet that only depends on the viewlet manager or interfaces is better22:29
CrippsFXignas: yes, but the viewlet will call the same resource regardless if it's registered under "viewlet" or registered under "resource"22:30
ignasthan having a viewlet that has "you must register resource 'foo' if you want to use this viewlet"22:30
CrippsFXeither way, the resource has to be registered.22:30
ignasCrippsFX: yes, but different sites have different resources22:30
ignasnow if you want to use the same viewlet in more than 1 site22:30
ignasyou will have to register the resource for all the sites, or you can just register it with the viewlet and it will just work22:31
CrippsFXignas: right ... you'd have to change the viewlet code instead of just configuration code.22:31
CrippsFXignas: 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
ignasmaybe, though i was talking about the same resource even22:34
ignasdifferent sites have different sets of resources iirc22:34
ignasso if you have foo.jpg registered in site 122:35
ignasit is not available in site 222:35
xbeanxor may not be the same foo.jpg22:35
ignasso 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
CrippsFXignas: yeah ... but names are always changeable (slash, inter-changable) because of the whole configuration thing.22:35
CrippsFXanyways ... my brain is toast. It's home time. Then nap time.22:36
CrippsFXI'll be back in 15 hours. Cheers :P22:36
xbeanxme too22:36
*** xbeanx has quit IRC22:36
*** reco has joined #zope3-dev22:44
*** dunny has joined #zope3-dev22:51
*** benji has quit IRC22:51
*** dobee has joined #zope3-dev23:06
*** dobee has quit IRC23:09
*** lzdych has quit IRC23:11
*** natea_ has quit IRC23:15
*** mgedmin has quit IRC23:21
*** Aiste has quit IRC23:27
*** Aiste has joined #zope3-dev23:30
*** dobee has joined #zope3-dev23:30
*** foxmjay_ has joined #zope3-dev23:40
*** dunny has quit IRC23:40
*** foxmjay_ has quit IRC23:40
*** dobee has quit IRC23:42
*** naro has quit IRC23:53
*** afd__ has quit IRC23:55
*** kali67 has joined #zope3-dev23:58
*** grahal has quit IRC23:59

Generated by 2.15.1 by Marius Gedminas - find it at!