*** markup_ has joined #zope3-dev | 00:03 | |
*** ChrisW_ has quit IRC | 00:08 | |
*** yota has joined #zope3-dev | 00:14 | |
*** alga has quit IRC | 00:15 | |
*** romanofski has joined #zope3-dev | 00:16 | |
*** reco has joined #zope3-dev | 00:27 | |
*** gumpa has quit IRC | 00:28 | |
*** gumpa has joined #zope3-dev | 00:28 | |
*** regebro has quit IRC | 00:29 | |
*** romanofski has quit IRC | 00:34 | |
*** gumpa has quit IRC | 00:48 | |
*** gumpa has joined #zope3-dev | 00:49 | |
*** benji has quit IRC | 00:59 | |
*** gumpa has left #zope3-dev | 01:09 | |
*** MJ is now known as MJ|sleep | 01:10 | |
*** J1m has quit IRC | 01:11 | |
*** RaFromBRC_ has joined #zope3-dev | 01:18 | |
*** RaFromBRC_ has quit IRC | 01:20 | |
*** RaFromBRC_ has joined #zope3-dev | 01:20 | |
*** batlogg has quit IRC | 01:21 | |
*** markup_ has left #zope3-dev | 01:27 | |
*** RaFromBRC has quit IRC | 01:30 | |
*** RaFromBRC_ is now known as RaFromBRC | 01:34 | |
*** edgordon has quit IRC | 02:12 | |
*** jinty has quit IRC | 02:20 | |
*** edgordon has joined #zope3-dev | 02:31 | |
*** flox has quit IRC | 02:35 | |
*** radix has joined #zope3-dev | 02:43 | |
*** rocky is now known as rocky|Zzz | 02:55 | |
*** benji has joined #zope3-dev | 03:23 | |
WebMaven | Does anyone have or know of an 'Event' content type for Zope3? | 03:24 |
---|---|---|
WebMaven | I'd rather reuse/extend one than invent one. | 03:25 |
*** dunny has quit IRC | 03:27 | |
*** wrobel has quit IRC | 03:44 | |
*** yota has quit IRC | 03:51 | |
*** reco has quit IRC | 04:06 | |
*** stub has joined #zope3-dev | 04:13 | |
*** radix has left #zope3-dev | 04:17 | |
*** alecm has quit IRC | 04:24 | |
*** alecm has joined #zope3-dev | 04:50 | |
*** dunny has joined #zope3-dev | 04:54 | |
*** whit has quit IRC | 04:59 | |
*** niemeyer has quit IRC | 05:11 | |
*** sussi has joined #zope3-dev | 05:12 | |
*** alecm has quit IRC | 05:24 | |
*** sussi has quit IRC | 05:35 | |
*** replicant has quit IRC | 06:07 | |
*** alecm has joined #zope3-dev | 06:22 | |
*** alecm has quit IRC | 06:26 | |
*** baijum has joined #zope3-dev | 06:32 | |
*** TresEquis has joined #zope3-dev | 06:38 | |
*** alecm has joined #zope3-dev | 06:46 | |
*** philiKON has joined #zope3-dev | 07:14 | |
*** philiKON has quit IRC | 07:32 | |
*** philiKON has joined #zope3-dev | 07:33 | |
*** strichter has joined #zope3-dev | 08:00 | |
*** dobee has joined #zope3-dev | 08:04 | |
*** stub has quit IRC | 08:11 | |
*** stub has joined #zope3-dev | 08:11 | |
*** eins has joined #zope3-dev | 08:12 | |
*** srichter has quit IRC | 08:16 | |
*** jukart has joined #zope3-dev | 08:42 | |
*** timte has joined #zope3-dev | 08:59 | |
*** batlogg has joined #zope3-dev | 09:00 | |
*** philiKON has quit IRC | 09:03 | |
*** dobee has quit IRC | 09:04 | |
*** hdima has joined #zope3-dev | 09:19 | |
*** batlogg has quit IRC | 09:23 | |
*** strichter is now known as srichter | 09:27 | |
*** ChanServ sets mode: +o srichter | 09:27 | |
*** dobee has joined #zope3-dev | 09:30 | |
rom|aw | /anick romanofski | 09:30 |
*** rom|aw is now known as romanofski | 09:30 | |
romanofski | morjens :) | 09:32 |
*** dlk has joined #zope3-dev | 09:40 | |
*** philiKON has joined #zope3-dev | 09:50 | |
*** MJ|sleep is now known as MJ | 09:58 | |
*** d21 has joined #zope3-dev | 10:01 | |
*** d2m has quit IRC | 10:01 | |
*** d2m has joined #zope3-dev | 10:04 | |
*** jinty has joined #zope3-dev | 10:07 | |
*** baijum has quit IRC | 10:10 | |
*** rocky|Zzz has quit IRC | 10:10 | |
*** baijum has joined #zope3-dev | 10:11 | |
*** rocky|Zzz has joined #zope3-dev | 10:11 | |
*** dieselross has joined #zope3-dev | 10:16 | |
*** dieselross has left #zope3-dev | 10:16 | |
*** harobed has joined #zope3-dev | 10:20 | |
philiKON | baijum, i corrected/updated ProjectStatus a bit | 10:37 |
harobed | philiKON: I get your book, it's very good, I've read seven first chapter | 10:42 |
philiKON | i'm glad you like it | 10:42 |
*** alecm has quit IRC | 10:42 | |
harobed | philiKON: only few older | 10:42 |
philiKON | ? | 10:42 |
harobed | it's old, when you 're write it, zope 3.0 isn't exists, now the current version is 3.3 | 10:43 |
harobed | s/'re/'' | 10:43 |
baijum | philiKON: ok, any other status required there? | 10:44 |
philiKON | dunno | 10:44 |
philiKON | harobed, when i wrote it, zope 3.0 was almost ready. the book is about 3.0. | 10:44 |
philiKON | harobed, many things in the book still apply to 3.3 | 10:44 |
philiKON | fortunately, a new edition is on its way | 10:44 |
*** xenru has joined #zope3-dev | 10:45 | |
*** srichter has quit IRC | 10:49 | |
harobed | philiKON: yes, I know, but at the beginning, you speak about zopeX3 | 10:49 |
harobed | ok, I understand, zopeX3 is the code name | 10:50 |
d2m | harobed: zopeX3 has been released 2 years ago (http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZopeX3300), it was the first public release of the new branch | 10:52 |
philiKON | it was X3 3.0, 3.1, 3.2, 3.3 | 10:54 |
philiKON | 'nuff said | 10:54 |
*** MJ has quit IRC | 10:59 | |
*** srichter has joined #zope3-dev | 11:14 | |
*** tonico|away has quit IRC | 11:15 | |
*** yota has joined #zope3-dev | 11:29 | |
*** MJ has joined #zope3-dev | 11:31 | |
*** tonico has joined #zope3-dev | 11:31 | |
*** ChanServ sets mode: +o srichter | 11:36 | |
*** dobee has quit IRC | 11:44 | |
*** xenru has quit IRC | 11:47 | |
*** dobee has joined #zope3-dev | 11:49 | |
*** xenru has joined #zope3-dev | 11:52 | |
*** philiKON has quit IRC | 11:56 | |
*** dokai has quit IRC | 11:59 | |
*** dokai has joined #zope3-dev | 12:01 | |
*** dokai_ has joined #zope3-dev | 12:01 | |
*** dokai has quit IRC | 12:01 | |
*** dokai_ is now known as dokai | 12:02 | |
*** xenru|clone has joined #zope3-dev | 12:02 | |
*** J1m has joined #zope3-dev | 12:03 | |
*** philiKON has joined #zope3-dev | 12:04 | |
*** xenru has quit IRC | 12:05 | |
*** J1m has quit IRC | 12:05 | |
*** xenru|clone has quit IRC | 12:12 | |
*** jinty has quit IRC | 12:45 | |
*** jukart has quit IRC | 12:49 | |
*** dunny has quit IRC | 12:53 | |
*** mgedmin has joined #zope3-dev | 13:04 | |
*** mkerrin has joined #zope3-dev | 13:12 | |
*** J1m has joined #zope3-dev | 13:16 | |
*** roym has joined #zope3-dev | 13:21 | |
roym | Folks, In my doctest, I have declared an adapter for: | 13:21 |
roym | IAnnotatable->IWriteZopeDublinCore (ZDCAnnotatableAdapter) | 13:21 |
roym | MyClass implements IAnnotatable. | 13:21 |
roym | I have an instance myClass of class MyClass. | 13:21 |
roym | However, IWriteZopeDublinCore(myClass) fails as follows: | 13:21 |
roym | TypeError: ('Could not adapt', <MyClass ...>, ...IWriteZopeDublinCore) | 13:22 |
*** ChrisW_ has joined #zope3-dev | 13:22 | |
roym | Shouldn't this work? | 13:22 |
ChrisW_ | hey all, where can I find docs for the subscriber directive? | 13:22 |
*** ChrisW_ is now known as ChriswW | 13:22 | |
*** ChriswW is now known as ChriswW_ | 13:22 | |
*** ChriswW_ is now known as ChrisW | 13:24 | |
*** oferw has joined #zope3-dev | 13:28 | |
mgedmin | roym: in your doctest's setup, have you called | 13:32 |
mgedmin | zope.app.testing.setup.placelessSetUp() followed by zope.app.testing.setup.setUpAnnotations()? | 13:32 |
mgedmin | ChrisW: I usually give up looking for documentation and go read the sources instead :( | 13:33 |
ChrisW | heh, the usual zope way ;-) | 13:33 |
ChrisW | the "for" parameter of the subcriber directive... | 13:33 |
mgedmin | it is convenient that the handlers of most zcml directives are named the same way as the directive itself | 13:33 |
ChrisW | yeah, so I saw | 13:33 |
mgedmin | and with ctags its trivial to find the definition of a function by name | 13:34 |
ChrisW | but I couldn't really follow the code for the subscriber handler :-/ | 13:34 |
mgedmin | also, there usually are IFooDirective interfaces that describe the parameters for <foo> | 13:34 |
ChrisW | annnyway | 13:34 |
ChrisW | <subscriber | 13:34 |
ChrisW | handler="pharos.subscribers.catalog" | 13:34 |
ChrisW | for="zope.app.container.contained.ObjectAddedEvent | 13:34 |
ChrisW | twiddler.interfaces.ITwiddler" | 13:34 |
ChrisW | /> | 13:34 |
ChrisW | >>> from twiddler.interfaces import ITwiddler | 13:35 |
ChrisW | >>> ITwiddler.implementedBy(app.test) | 13:35 |
ChrisW | False | 13:35 |
ChrisW | >>> ITwiddler.providedBy(app.test) | 13:35 |
ChrisW | True | 13:35 |
ChrisW | >>> | 13:35 |
ChrisW | (yeah, i know, shoot me for pasting :-P) | 13:35 |
ChrisW | but, ObjectAddedEvents aren't getting to my susbcriber when i add in the ITwiddler to the "for" attribute | 13:35 |
ChrisW | I'm wondering why not... | 13:35 |
mgedmin | hmm | 13:36 |
mgedmin | I think you need to reverse the order | 13:37 |
mgedmin | for="...ITwiddler ...IObjectAddedEvent" | 13:37 |
roym | mgedmin: I have, but still no luck... is my basic assumption valid - ie: that the adapter machinery will keep looking thru base interfaces till it finds an adapter? | 13:37 |
ChrisW | why does the order matter? | 13:37 |
* mgedmin blinks | 13:37 | |
mgedmin | because the handler for IObjectMovedEvent dispatches on the tuple (object, event) rather than on the tuple (event, object) | 13:38 |
mgedmin | err, s/IObjectMovedEvent/IObjectEvent/ | 13:39 |
mgedmin | it's in zope.component.event: objectEventNotify | 13:39 |
ChrisW | yeah, but Iwas talking about IObjectAddedEvent | 13:39 |
mgedmin | roym: sorry, I hadn't looked closely enough | 13:40 |
mgedmin | ChrisW: IObjectAddedEvent is a subinterface of IObjectEvent | 13:40 |
mgedmin | roym: you declared that MyClass implements IAnnotatable; it's your responsibility to declare an adapter for it to IAnnotations | 13:40 |
mgedmin | roym: if you had declared that MyClass implements IAttributeAnnotatable, then you would get that adapter for free | 13:41 |
ChrisW | hurm, I see no .event in zope.component | 13:41 |
ChrisW | are these events different in Zope 2.9? | 13:41 |
mgedmin | z3 trunk? | 13:41 |
mgedmin | it used to live in zope.app.event.objectevent | 13:41 |
ChrisW | yeha, but I'm using Zope 2.9 ;-) | 13:41 |
mgedmin | try looking there | 13:41 |
ChrisW | ah, I'll ook there... | 13:41 |
ChrisW | weird | 13:44 |
ChrisW | see? this is my lack of understanding of the subscriber directive | 13:44 |
roym | mgedmin: this is a tough one for me... putting a breakpoint | 13:44 |
roym | in the code, I see | 13:44 |
roym | (Pdb) zope.annotation.interfaces.IAttributeAnnotatable(self) | 13:44 |
roym | <MyClass object at 0xa7b046ac> | 13:44 |
roym | (Pdb) IAnnotatable(self) | 13:44 |
roym | <MyClass object at 0xa7b046ac> | 13:44 |
roym | yet, IWriteZopeDublinCore(myClass) fails as shown above... | 13:46 |
roym | s/myClass/self/ | 13:46 |
ChrisW | does ISubscriberDirective actually exist? | 13:46 |
mgedmin | oh, wait a second | 13:47 |
mgedmin | roym: you may have to provide the dublin code adapter too | 13:47 |
mgedmin | roym: zope.dublincore.testing.setUpDublinCore() | 13:48 |
mgedmin | ChrisW: I don't know | 13:48 |
roym | but I already have: | 13:48 |
roym | IAnnotatable->IWriteZopeDublinCore (ZDCAnnotatableAdapter) | 13:48 |
mgedmin | ChrisW: yes, it exists: zope.component.zcml.ISubscriberDirective | 13:48 |
roym | this is from: list(gsm.registeredAdapters()) | 13:49 |
mgedmin | oookay, I don't know, then | 13:49 |
*** Aiste has joined #zope3-dev | 13:51 | |
ChrisW | interesting | 13:51 |
ChrisW | the dostring for ISubsriberDirective.for is pretty damn vague :-/ | 13:51 |
philiKON | ChrisW, what's your problem? | 13:51 |
* ChrisW pokes Aiste: hey :-) | 13:52 | |
ChrisW | philiKON: just trying to get my head round how event subscribers actually work | 13:52 |
Aiste | ChrisW: hya | 13:52 |
philiKON | ChrisW, my book explains it | 13:52 |
ChrisW | not in much detail ;-) | 13:52 |
ChrisW | maybe the new revision, which we're all waiting for | 13:52 |
philiKON | what's your question specifically? | 13:52 |
ChrisW | the subscriber directive isn;t even in the zcml reference | 13:52 |
philiKON | huh? | 13:53 |
philiKON | ah | 13:53 |
philiKON | yeah | 13:53 |
ChrisW | well, it isn;t... | 13:53 |
ChrisW | ;-) | 13:53 |
philiKON | http://worldcookery.com/Errata | 13:53 |
philiKON | i forgot it :) | 13:53 |
*** rocky|Zzz is now known as rocky | 13:53 | |
ChrisW | anyway, specific question: what really goes in the "for" parameter | 13:53 |
ChrisW | how many interfaces can you pass? | 13:53 |
ChrisW | what roder do the yneed to be in? | 13:53 |
ChrisW | what if an object implements more than one interface? | 13:54 |
philiKON | depends on what kind of event you're subscribing to | 13:54 |
ChrisW | do all subscribers for all interfaces get fired? | 13:54 |
philiKON | ChrisW, if you want, i can | 13:54 |
ChrisW | right, so the event controls how many interfaces you can supply to the subscriber directive? | 13:54 |
philiKON | forget that | 13:54 |
philiKON | ChrisW, no, not the event | 13:55 |
philiKON | standard event subscribers subscribe to the event type | 13:55 |
philiKON | @adapter(ITheEventType) | 13:55 |
philiKON | def foo(event): | 13:55 |
philiKON | # called when an ITheEventType is sent | 13:55 |
ChrisW | intersting, didn't know there was a decorator for it ;-) | 13:55 |
philiKON | yup | 13:56 |
ChrisW | anyway, that's beside the point here | 13:56 |
ChrisW | it appears the originator of the event decides what the parameters are for the subscriber? | 13:56 |
philiKON | no | 13:57 |
philiKON | subscribers always just get the event | 13:57 |
philiKON | however | 13:57 |
ChrisW | eh? | 13:57 |
philiKON | we have subscribers that dispatch events to other subscribers | 13:57 |
ChrisW | the code doesn't agree... | 13:57 |
ChrisW | oh | 13:57 |
philiKON | lemme finish | 13:57 |
ChrisW | *sigh* | 13:57 |
philiKON | so, we have a subscriber for IObjectEvent | 13:57 |
philiKON | that dispatches from (event) to (object, event) | 13:58 |
ChrisW | ah | 13:58 |
philiKON | that way you can register object event subscribers for just IMyObject | 13:58 |
ChrisW | THAT isn't documented anywhere sensible :-( | 13:58 |
philiKON | well, my new book | 13:58 |
philiKON | :) | 13:58 |
philiKON | well, also in the old book i believe | 13:58 |
ChrisW | okay, but how come you can use a susbcribe directive to subscribe to (object,event)? | 13:58 |
philiKON | why not? | 13:59 |
philiKON | @adapter(IMyObject, IObjectAddedEvent) | 13:59 |
ChrisW | subscribe is a generic subcriber thing, right? | 13:59 |
philiKON | def onMyObjectAdded(obj, event) | 13:59 |
philiKON | yup | 13:59 |
philiKON | example: | 13:59 |
philiKON | @adapter(IMyObject, IObjectAddedEvent) | 13:59 |
philiKON | def onMyObjectAdded(obj, event) | 13:59 |
philiKON | # foo | 13:59 |
philiKON | <subscriber handler=".onMyObjectAdded" /> | 13:59 |
ChrisW | and you said you can only subscribe to the interface of the event | 13:59 |
philiKON | no | 14:00 |
philiKON | i never said that | 14:00 |
ChrisW | well, the nwhat _can_ you subscribe to? | 14:00 |
ChrisW | ;-) | 14:00 |
philiKON | any number of interfaces | 14:00 |
philiKON | one, two, three :) | 14:00 |
ChrisW | (and we're back again to what the "for" attribute actually means, and its suck lack of documentation :-P) | 14:00 |
ChrisW | okay, btu what dispatches to those subscribers? | 14:00 |
philiKON | subscribers do :) | 14:01 |
philiKON | zope.app.event.objectevent ahs: | 14:01 |
ChrisW | and how does the subscribe directive know to subscribe to those subscribers, rather than to the actual event service? | 14:01 |
philiKON | def objectEventNotify(event): | 14:02 |
philiKON | adapters = subscribers((event.object, event), None) | 14:02 |
philiKON | for adapter in adapters: | 14:02 |
philiKON | pass # getting them does the work | 14:02 |
philiKON | so, objectEventNotify listens to all object events | 14:02 |
philiKON | and dispatches to (obj, event) | 14:02 |
philiKON | there's no event service | 14:02 |
ChrisW | all adapters now? | 14:02 |
philiKON | yeah | 14:03 |
philiKON | subscribers are special kind of adapter,s but the semantics are the same | 14:03 |
ChrisW | so you cn register an adapter for a tuple of interfaces? | 14:04 |
philiKON | yes | 14:04 |
*** oferw has quit IRC | 14:04 | |
philiKON | but you have to make sure your subscriber is actually looked up that way | 14:04 |
philiKON | normally, only single-object subscribers are found | 14:04 |
philiKON | and subscribers to (obj, IObjectModifiedEvent) | 14:05 |
philiKON | err. | 14:05 |
philiKON | and subscribers to (obj, IObjectEvent) | 14:05 |
philiKON | if you want your subscriber to (IFrobnaz, Iwhatever) be found, you need to look it up :) | 14:05 |
philiKON | (unless IWhatever is a subinterface of IObjectEvent and there's an event about IFrobnaz) | 14:05 |
*** ignas has joined #zope3-dev | 14:06 | |
ChrisW | I was asking a more generic question about adaptation ;-) | 14:06 |
ChrisW | last time I looked at adapting, you could only adapter one interface to another | 14:06 |
philiKON | that was about 4 years ago | 14:06 |
ChrisW | so you're now saying you can adapt a tuple of interfaces to something? | 14:06 |
philiKON | sure, that's how views work dude | 14:06 |
philiKON | they adapt (obj, request) | 14:07 |
philiKON | getMultiAdapter((obj, request), name="index.html") | 14:07 |
ChrisW | well, IObj,IRequest I;m guessing? | 14:07 |
*** benji has quit IRC | 14:07 | |
ChrisW | aha, and now i know what MultiAdapters are... | 14:07 |
philiKON | no | 14:07 |
philiKON | you never adapt interfaces | 14:07 |
philiKON | well, you could | 14:07 |
philiKON | but it wouldn't make any sense | 14:07 |
ChrisW | they covered in your book's 1st edition? | 14:07 |
philiKON | sorta | 14:08 |
philiKON | not really | 14:08 |
ChrisW | that's what I thought | 14:08 |
ChrisW | 2nd ed? | 14:08 |
J1m | philiKON, I forgot about the windows release. | 14:08 |
philiKON | ChrisW, yes, 2nd edition covers them in detail | 14:08 |
philiKON | because we do views with them now | 14:08 |
ChrisW | dammit | 14:09 |
ChrisW | need to beat springer to get them to print it :-P | 14:09 |
J1m | what's worse, my hard drive failed and it will take a lot of effort for me to make another one because I have to reinstall parallels and windows. :( | 14:09 |
philiKON | ChrisW, help them with the latex | 14:09 |
philiKON | J1m, :( | 14:09 |
J1m | I really screwed up with my non-backup strategy. :( | 14:09 |
philiKON | lol | 14:09 |
philiKON | i actually have access to a windoze box currently, but no VC 6 or 7 or whatever | 14:10 |
J1m | not that fuunny. | 14:10 |
philiKON | no, it's not | 14:10 |
philiKON | sorry | 14:10 |
ChrisW | J1m: anything particular needed to build the release? | 14:10 |
theuni | J1m: you need a visual studio 2003, right? | 14:10 |
philiKON | ChrisW, http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZopeWindowsRelease | 14:10 |
J1m | ChrisW, see http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZopeWindowsRelease | 14:11 |
theuni | i have a box set up with which i compiled zodb a few days ago | 14:11 |
theuni | that should work with zope too, shouldn't it? | 14:11 |
J1m | vc7I think | 14:11 |
J1m | vc7 | 14:11 |
ChrisW | aka vs.net? | 14:11 |
J1m | The worst part for me will be setting up putty again. | 14:12 |
J1m | what a cluster | 14:12 |
ChrisW | ah yes, putty voodoo :-D | 14:12 |
ChrisW | mmm, want me to see if someone at RBS can build it? | 14:13 |
theuni | ChrisW: i think so. i think vc7 and 2003 are the same. 6 was the release before that which was used in the zope 2.7 days | 14:13 |
theuni | (add IIRC to all of those statements) | 14:13 |
J1m | It needs to be tested too. | 14:13 |
ChrisW | what do you mean by "tested"? | 14:13 |
J1m | I tested what I built, but I fat-fingered what I built and tested the wrong release. | 14:13 |
J1m | Follow the instructions in the link we provided. | 14:13 |
philiKON | ChrisW, instructions are given | 14:14 |
philiKON | run tests, make an instance, register as service, etc. | 14:14 |
ChrisW | ah, okay, that link gives the whole set of instructions? | 14:14 |
J1m | Unfortunately, we could find a windows problem that forces us to remake the source release. :( | 14:14 |
philiKON | ChrisW, yes | 14:14 |
ChrisW | k, I'll fire off an email and see if Dan bites... | 14:14 |
philiKON | J1m, we can cross taht bridge when we come to it... | 14:15 |
*** flox has joined #zope3-dev | 14:15 | |
ChrisW | k, what tag should he build from? | 14:16 |
philiKON | 3.3.0 | 14:17 |
ChrisW | url? | 14:17 |
philiKON | svn://svn.zope.org/repos/main/Zope3/tags/3.3.0 | 14:18 |
ChrisW | (oh, anda quickie: can I define a marker interface in zcml? how do I assert that a class implements an interface in zcml?) | 14:19 |
philiKON | no and no | 14:19 |
ChrisW | :-( | 14:19 |
philiKON | what you *can* say is: | 14:19 |
philiKON | <class class="..."> | 14:19 |
philiKON | <implements interface="..."> | 14:19 |
philiKON | </class> | 14:19 |
ChrisW | but I still have to define that interface in a python file,right? | 14:20 |
rocky | philiKON: what's the diff between <five:implements> and that what you just displayed? | 14:20 |
TresEquis | ChrisW: depends | 14:21 |
philiKON | rocky, none | 14:21 |
TresEquis | I have written directives which synthesize interfaces on the fly | 14:21 |
philiKON | from zope 2 interfaces ;) | 14:21 |
rocky | philiKON: then why hasn't five:implements been deprecated? :) | 14:21 |
TresEquis | userschema, too (from HTML forms / CSV files) | 14:22 |
philiKON | rocky, sigh... :) | 14:22 |
ChrisW | TresEquis: okay, but this is just a marker interface | 14:22 |
philiKON | rocky, saw my recent blog entry? | 14:22 |
ChrisW | I'm 90% done on a little how-to for event-based cataloging in Zope 2 | 14:22 |
philiKON | rocky, recent as in this morning | 14:22 |
rocky | lol, maybe not... man i have like 15mil blog posts to read every day ;) | 14:22 |
ChrisW | it's pretty easy, but being able to mark classes with a notional ICatalogAware would be nice ;-) | 14:22 |
philiKON | ChrisW, maker interfaces that are not importable from python have a problem | 14:22 |
rocky | i'm downloading the 4 movies from the dzug thing now *hoping* i can find time to watch them | 14:22 |
philiKON | ChrisW, because they'd be pickled | 14:22 |
philiKON | whichi s currently not possible | 14:23 |
philiKON | but even if it'd be possible, you'd lose identify | 14:23 |
ChrisW | yeah, okay, but do you see what I'm getting at? | 14:23 |
ChrisW | zcml is supposed to mean "config in zcml" | 14:23 |
philiKON | i wish it just said "register" :) | 14:24 |
philiKON | zrml | 14:24 |
ChrisW | buit what you're saying is that I have to define my interface in a python file? okay, that's fine, annoying, but fine | 14:24 |
philiKON | yes. and that's not even a zcml thing | 14:24 |
philiKON | as said, it has to do with object identify | 14:24 |
philiKON | which you really want | 14:24 |
ChrisW | but now I can't assert that a class implements that interface without dropping to python?! | 14:24 |
philiKON | especially w/ interfaces | 14:24 |
philiKON | ChrisW, sure | 14:25 |
philiKON | ChrisW, you can | 14:25 |
philiKON | i just told you | 14:25 |
ChrisW | <class ..? | 14:25 |
philiKON | yes | 14:25 |
philiKON | RTFM | 14:25 |
philiKON | (my book) | 14:25 |
philiKON | :) | 14:25 |
ChrisW | I am | 14:25 |
ChrisW | RMFB :-P ;-) | 14:25 |
TresEquis | philiKON: "importable" doesn't mean "defined via a class statement" | 14:25 |
ChrisW | okay, it is a shame you can't define marker interfaces in zcml though... | 14:25 |
ChrisW | <zope:interface>ICatalogAware</zope:interface> ...would be nice | 14:26 |
TresEquis | ChrisW: write such a directive, then ;) | 14:26 |
philiKON | TresEquis, correct | 14:26 |
rocky | we could always use more zcml directives that create magical python classes *grin* | 14:27 |
TresEquis | It would need to be <interface name="some.dotted.path.ICatalogAware" /> | 14:27 |
ChrisW | Tres: why can't we use the value? | 14:27 |
TresEquis | rocky: interfaces arent classes ;) | 14:27 |
ChrisW | xml allows values for a tag for a reason :-P | 14:27 |
rocky | lol | 14:27 |
TresEquis | because ZCML is an attribute-based XML language | 14:27 |
TresEquis | and we want to be "like" the other directives | 14:28 |
ChrisW | ie: sack o crud ;-) | 14:28 |
TresEquis | THe "correct" value for the element content would be a *description* | 14:28 |
rocky | for the record, it's easier to control what the type of something should be if it's an attribute than if it's the body of another tag from the perspective of XML schemas | 14:28 |
TresEquis | Bog forbid we actually document the intent of your marker | 14:29 |
philiKON | you can always say <directive>comment</directive> in zcml | 14:29 |
philiKON | <adapter factory="...">text ignored here</adapter> | 14:29 |
TresEquis | the description could even get turned into the docstring of the synthesized interface | 14:30 |
TresEquis | hell, I wouldn't mind defining APIs that way ;) | 14:30 |
*** jinty has joined #zope3-dev | 14:30 | |
rocky | lol | 14:31 |
* rocky replaces TresEquis' python interpreter with an interactive xml shell ;) | 14:31 | |
TresEquis | <interface name="path.to.IFoo">This is the Foo interface<method name="bar">Drink heavily<argument="pints"/></method></interface> | 14:31 |
ChrisW | cool, right, zcml worhsiping over, it does actually work :-) | 14:31 |
TresEquis | interfaces are all declarative anyway | 14:32 |
*** zbir has joined #zope3-dev | 14:32 | |
TresEquis | zbir: howdy | 14:32 |
ChrisW | where's the best place to put a how-to on simple, event-based cataloging in Zope 2? | 14:32 |
ChrisW | ('cuz this is pretty neat :-) ) | 14:32 |
ChrisW | <class class="OFS.Image.File"> | 14:33 |
ChrisW | <implements interface="pharos.subscribers.ICatalogAware"/> | 14:33 |
ChrisW | </class> | 14:33 |
ChrisW | :-) | 14:33 |
mgedmin | yeah, and sometimes I think it is pretty evil | 14:34 |
mgedmin | when I have to repeat that in my tests' setUp | 14:35 |
TresEquis | why would you? | 14:35 |
TresEquis | moving it to ZCML makes it part of "site configuration", not unit testable | 14:35 |
zbir | hey, TresEquis | 14:36 |
TresEquis | if you're doing system tests, then of course you load the ZCML | 14:36 |
TresEquis | How's wikiland, Zac? | 14:36 |
*** niemeyer has joined #zope3-dev | 15:02 | |
*** benji has joined #zope3-dev | 15:16 | |
zbir | TresEquis: good. wikiriffic. | 15:16 |
*** alga has joined #zope3-dev | 15:28 | |
*** J1m has quit IRC | 15:38 | |
roym | mgedmin: if you're still there, I figured out why the | 15:41 |
roym | IWriteZopeDublinCore adapter wasn't being picked up. It was registered | 15:41 |
roym | ok, but that entry was being clobbered by a later call to | 15:41 |
roym | placelessSetUp(). Thanks for your help. | 15:41 |
*** whit has joined #zope3-dev | 15:41 | |
mgedmin | ah | 15:43 |
mgedmin | yeah | 15:43 |
*** J1m has joined #zope3-dev | 15:43 | |
*** stub has quit IRC | 15:52 | |
theuni | hmm | 16:24 |
theuni | transaction.savepoint() does not add an _p_jar necessarily to objects that are new in a database? | 16:24 |
*** baijum has quit IRC | 16:30 | |
*** rocky is now known as rocky|away | 16:38 | |
*** zbir has quit IRC | 16:40 | |
*** zbir has joined #zope3-dev | 16:40 | |
*** eins has quit IRC | 16:47 | |
*** roym has left #zope3-dev | 16:54 | |
*** volvox has joined #zope3-dev | 16:55 | |
*** zbir has quit IRC | 17:02 | |
*** zbir has joined #zope3-dev | 17:02 | |
J1m | theuni, of course not. | 17:02 |
theuni | Obviously I was still spoiled by subtransactions. :) | 17:03 |
J1m | I doubt that the old transaction code would do that wither. | 17:03 |
J1m | either | 17:03 |
J1m | That is up to the connection to do that. | 17:03 |
J1m | Certainly, when you set a savepoint, the _p_jar will be set on any new objets saved. | 17:04 |
J1m | But not by the transaction code. | 17:04 |
theuni | Umm. What's the exact difference to what I asked? | 17:04 |
J1m | You asked whether the transaction savepoint method added it. | 17:05 |
theuni | Uh. I meant to ask whether the mechanics of "making" a savepoint will cause _p_jar to be set. :) | 17:05 |
J1m | Setting a savepoint is a good way to set _p_jar, at least when only one database is involved. | 17:06 |
theuni | For some reason this didn't happen when I tried to do that for an object that I've put into a session that was just created in the same request. | 17:07 |
theuni | I've worked around it by initializing the session one request earlier, but I consider that to be a nasty hack. | 17:07 |
J1m | sounds like it | 17:08 |
theuni | At least it sounds like you'd expect the _p_jar to be set after calling savepoint(), so I can check why it doesn't happen in this case. | 17:09 |
J1m | absolutely. | 17:09 |
J1m | Of course, this assumes that the object is reachable from an object that is already in the database. | 17:09 |
theuni | yup | 17:10 |
*** gumpa has joined #zope3-dev | 17:10 | |
theuni | i guess that it's not the case for the session in that moment | 17:10 |
ChrisW | J1m: unfortuantely Dan's not going to get a chance to look at that windows build this week, you still want me to ask if he can slotit in next week some time? | 17:18 |
J1m | I dunno | 17:19 |
theuni | humm | 17:22 |
theuni | Why does z.a.session.session.Session.get() reimplement __getitem__() instead of just calling __getitem__() and catching a keyerror? | 17:23 |
ChrisW | k, I'll tell him to hold fire, but just drop me an email if you want me to give him a poke later :-) | 17:23 |
theuni | would it be ok to refactor that? | 17:23 |
*** ErikRose has joined #zope3-dev | 17:25 | |
theuni | hmm. looks like i made the savepoint() in the wrong place. after digging through it, i got it working ... Also the code duplication isn't a real code duplication. __getitem__ never throws a key error but creates its own default values. | 17:29 |
*** hdima has quit IRC | 17:30 | |
*** philiKON has quit IRC | 17:31 | |
*** tonico_ has joined #zope3-dev | 17:35 | |
*** tonico_ has quit IRC | 17:36 | |
*** tonico_test has joined #zope3-dev | 17:37 | |
*** alecm has joined #zope3-dev | 17:39 | |
*** tonico_test has quit IRC | 17:39 | |
*** philiKON has joined #zope3-dev | 17:40 | |
*** TresEquis has quit IRC | 17:44 | |
*** ChrisW has left #zope3-dev | 17:46 | |
*** rocky|away is now known as rock1 | 17:47 | |
*** rock1 is now known as rocky | 17:47 | |
*** regebro has joined #zope3-dev | 17:48 | |
*** zagy has quit IRC | 17:48 | |
*** gumpa has quit IRC | 17:55 | |
*** gump1 has joined #zope3-dev | 17:55 | |
whit | is there a channel for lxml somewhere? | 18:04 |
romanofski | in doubt you can speak to faassen in #silva | 18:05 |
romanofski | oh.. but he isn't there as well | 18:06 |
romanofski | sorry | 18:06 |
*** ktwilight has quit IRC | 18:08 | |
*** ktwilight_ has joined #zope3-dev | 18:15 | |
*** ktwilight_ has quit IRC | 18:17 | |
*** ktwilight has joined #zope3-dev | 18:19 | |
philiKON | whit, you can ping thisfred or wimbou :) | 18:22 |
philiKON | they have within kicking range | 18:23 |
philiKON | s/have/are/ | 18:23 |
*** flox has quit IRC | 18:23 | |
whit | ah yes...danke philiKON | 18:23 |
philiKON | kein problem | 18:23 |
nouri | Martijn's ill today. He's not at the office | 18:26 |
nouri | drop a mail: faassen@infrae.com | 18:26 |
*** replicant has joined #zope3-dev | 18:35 | |
*** ktwilight has quit IRC | 18:38 | |
*** dlk has left #zope3-dev | 18:40 | |
*** harobed has quit IRC | 18:44 | |
*** d2m has left #zope3-dev | 18:50 | |
*** ktwilight has joined #zope3-dev | 18:53 | |
*** d2m has joined #zope3-dev | 18:55 | |
*** edgordon has quit IRC | 18:58 | |
*** projekt01 has joined #zope3-dev | 19:01 | |
*** TresEquis has joined #zope3-dev | 19:03 | |
*** flox has joined #zope3-dev | 19:13 | |
*** projekt01 has quit IRC | 19:13 | |
*** dobee has quit IRC | 19:14 | |
*** volvox has quit IRC | 19:19 | |
*** srichter has quit IRC | 19:21 | |
*** zbir has quit IRC | 19:21 | |
*** MJ has quit IRC | 19:21 | |
*** zagy has joined #zope3-dev | 19:34 | |
*** zbir has joined #zope3-dev | 19:49 | |
*** MJ has joined #zope3-dev | 19:51 | |
*** regebro has quit IRC | 19:53 | |
*** alecm has quit IRC | 19:53 | |
*** RaFromBRC has quit IRC | 20:00 | |
*** RaFromBRC has joined #zope3-dev | 20:00 | |
*** philiKON has quit IRC | 20:04 | |
*** gump1 is now known as gumpa_afk | 20:06 | |
*** dunny has joined #zope3-dev | 20:09 | |
whit | anybody maintain any paste skeletons for zope3 stuff? | 20:11 |
*** oferw has joined #zope3-dev | 20:14 | |
*** TresEquis_ has joined #zope3-dev | 20:15 | |
*** ignas has quit IRC | 20:21 | |
*** edgordon has joined #zope3-dev | 20:24 | |
*** TresEquis has quit IRC | 20:32 | |
*** TresEquis_ is now known as TresEquis | 20:36 | |
*** ktwilight has quit IRC | 20:42 | |
*** torkel_ has joined #zope3-dev | 20:45 | |
*** oferw has quit IRC | 20:58 | |
*** jinty has quit IRC | 21:03 | |
*** regebro has joined #zope3-dev | 21:03 | |
*** ignas has joined #zope3-dev | 21:05 | |
*** regebro has quit IRC | 21:16 | |
*** tonico has quit IRC | 21:19 | |
*** tonico has joined #zope3-dev | 21:22 | |
*** tonico is now known as tonico|away | 21:23 | |
*** regebro has joined #zope3-dev | 21:32 | |
*** mgedmin has quit IRC | 21:32 | |
*** ignas_ has joined #zope3-dev | 21:44 | |
*** srichter has joined #zope3-dev | 21:46 | |
*** ChanServ sets mode: +o srichter | 21:46 | |
*** mkerrin has quit IRC | 21:51 | |
*** ignas has quit IRC | 21:51 | |
*** zagy has quit IRC | 21:55 | |
*** dobee has joined #zope3-dev | 21:56 | |
*** vbachs has joined #zope3-dev | 21:59 | |
*** regebro has quit IRC | 22:16 | |
*** RaFromBRC is now known as RaFromBRC|lunch | 22:53 | |
*** dunny has quit IRC | 22:57 | |
*** ofer has joined #zope3-dev | 23:02 | |
*** romanofs1i has joined #zope3-dev | 23:10 | |
*** romanofs1i is now known as romanofski_ | 23:12 | |
*** alecm has joined #zope3-dev | 23:20 | |
*** philiKON has joined #zope3-dev | 23:36 | |
*** alga has quit IRC | 23:52 | |
*** ignas__ has joined #zope3-dev | 23:54 | |
*** batlogg has joined #zope3-dev | 23:56 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!