IRC log of #zope3-dev for Friday, 2008-02-22

*** dobee has quit IRC00:17
*** alecm has joined #zope3-dev00:26
*** timte has quit IRC00:26
*** RaFromBRC is now known as RaFromBRC|lunch00:32
*** lucielejard has quit IRC00:43
*** afd__ has quit IRC00:50
*** Doc_Dan has quit IRC00:53
*** salfield has joined #zope3-dev00:54
*** J1m has quit IRC01:01
*** povbot has joined #zope3-dev01:10
*** sp0cksbeard has joined #zope3-dev01:11
*** alecm has joined #zope3-dev01:11
*** mcdonc has joined #zope3-dev01:11
*** derek|office has joined #zope3-dev01:12
*** pcardune has joined #zope3-dev01:12
*** salfield has joined #zope3-dev01:16
*** niemeyer has joined #zope3-dev01:16
*** pcardune_ has joined #zope3-dev01:16
*** jbonilla has joined #zope3-dev01:16
*** mcdonc_ has joined #zope3-dev01:16
*** derek_richardson has joined #zope3-dev01:16
*** Aiste has joined #zope3-dev01:16
*** pcardune_ has quit IRC01:16
*** derek_richardson has quit IRC01:17
*** RaFromBRC|lunch is now known as RaFromBRC01:17
*** mcdonc_ has quit IRC01:17
*** Aiste has quit IRC01:19
*** niemeyer has quit IRC01:19
*** salfield has quit IRC01:19
*** jbonilla has quit IRC01:19
*** jbonilla has joined #zope3-dev01:19
*** salfield has joined #zope3-dev01:19
*** Aiste has joined #zope3-dev01:19
*** niemeyer has joined #zope3-dev01:19
*** norro has quit IRC01:24
*** rmarianski has quit IRC01:29
*** rmarianski has joined #zope3-dev01:29
*** lucielejard has joined #zope3-dev01:35
*** pcardune has quit IRC01:53
*** b52laptop has quit IRC02:02
*** b52laptop has joined #zope3-dev02:03
*** quodt has quit IRC02:05
*** nathany has quit IRC02:18
*** regebro has quit IRC02:21
*** danielblackburn has joined #zope3-dev02:26
*** rmarianski has quit IRC02:26
*** sp0cksbeard has quit IRC02:26
*** rmarianski has joined #zope3-dev02:27
*** pbugni has quit IRC02:37
*** RaFromBRC is now known as RaFromBRC|away02:56
*** rmarianski_ has joined #zope3-dev02:57
*** rmarianski has quit IRC02:57
*** pcardune has joined #zope3-dev02:57
*** vod has quit IRC03:05
*** alecm has quit IRC03:25
*** rmarianski_ has quit IRC03:30
*** RaFromBRC|away is now known as RaFromBRC03:32
*** danielblackburn has quit IRC04:11
*** danielblackburn has joined #zope3-dev04:13
*** RaFromBRC has quit IRC04:27
*** niemeyer has quit IRC04:59
*** danielblackburn has quit IRC05:03
*** pcardune_ has joined #zope3-dev05:20
*** vod has joined #zope3-dev05:28
*** run|home has joined #zope3-dev05:29
*** natea_ has joined #zope3-dev05:35
*** pcardune has quit IRC05:37
*** lucielejard has quit IRC05:41
*** run|home_ has joined #zope3-dev05:47
*** greenman has quit IRC05:47
*** pcardune has joined #zope3-dev05:50
*** run|home has quit IRC05:54
*** rcrafton has quit IRC05:54
*** pcardune__ has joined #zope3-dev06:05
*** Macarse has left #zope3-dev06:09
*** pcardune_ has quit IRC06:09
*** pcardune has quit IRC06:22
*** pcardune has joined #zope3-dev06:38
*** alecm has joined #zope3-dev06:43
*** rcrafton has joined #zope3-dev06:47
*** pcardune__ has quit IRC06:55
*** greenman has joined #zope3-dev07:06
*** jayaraj has joined #zope3-dev07:06
*** baijum has joined #zope3-dev07:15
*** kursor has joined #zope3-dev07:24
*** pcardune has quit IRC07:34
*** afd_ has joined #zope3-dev07:35
*** alecm has quit IRC07:48
*** lisppaste6 has quit IRC07:48
*** alecm has joined #zope3-dev07:52
*** lisppaste6 has joined #zope3-dev07:56
*** philiKON_ has joined #zope3-dev08:07
*** kursor has quit IRC08:09
*** philiKON has quit IRC08:23
*** alecm has quit IRC08:41
*** d2m has joined #zope3-dev08:44
*** alecm has joined #zope3-dev08:48
*** natea_ has quit IRC08:49
*** greenman has quit IRC08:52
*** jukart has joined #zope3-dev08:55
*** alecm has quit IRC08:58
*** dunny has joined #zope3-dev09:02
*** sorin has joined #zope3-dev09:04
*** sorin is now known as sorindregan09:04
*** ghendi has joined #zope3-dev09:09
*** ignas has joined #zope3-dev09:11
*** dunny_ has quit IRC09:11
*** timte has joined #zope3-dev09:13
*** __mac__ has joined #zope3-dev09:30
*** pelle_ has quit IRC09:33
*** greenman has joined #zope3-dev09:36
*** __mac__ has quit IRC09:39
*** __mac__ has joined #zope3-dev09:40
*** dunny has quit IRC09:49
*** norro has joined #zope3-dev09:58
*** norro has quit IRC09:59
*** dobee has joined #zope3-dev10:00
*** MJ has joined #zope3-dev10:15
*** MJ is now known as MJ|1010:18
*** jpcw2002 has joined #zope3-dev10:29
*** jukart has quit IRC10:34
*** greenman has quit IRC10:37
*** dunny has joined #zope3-dev10:37
*** __mac___ has joined #zope3-dev10:39
*** __mac__ has quit IRC10:40
*** greenman has joined #zope3-dev10:42
*** __mac__ has joined #zope3-dev10:42
*** MJ|10 is now known as MJ|out10:52
*** harobed has joined #zope3-dev10:53
*** romanofski has quit IRC10:55
*** __mac____ has joined #zope3-dev10:56
*** __mac___ has quit IRC10:57
*** romanofski has joined #zope3-dev11:01
*** run|home has joined #zope3-dev11:04
*** __mac____ has quit IRC11:06
*** __mac___ has joined #zope3-dev11:06
*** jukart has joined #zope3-dev11:07
*** run|home_ has quit IRC11:09
*** __mac__ has quit IRC11:10
*** goschtl has joined #zope3-dev11:13
*** jukart_ has joined #zope3-dev11:17
*** menesis has joined #zope3-dev11:18
*** dunny_ has joined #zope3-dev11:20
*** philiKON_ has quit IRC11:23
*** dunny has quit IRC11:25
pyqwerI have some strange ZODB/BTree problem, does someone know why this happens:11:33
pyqwer  File "/local/home/dusty/Zope-3.4.0c1/lib/python/BTrees/Length.py", line 38, in __getstate__11:33
pyqwer    return self.value11:33
pyqwerAttributeError: 'Length' object has no attribute 'value'11:33
*** jukart has quit IRC11:34
*** jukart_ is now known as jukart11:42
*** greenman has quit IRC11:42
*** yvl has joined #zope3-dev11:45
*** dunny_ has quit IRC11:48
mcdoncpyqwer: it seems as if the length object had its value attr deleted... i've never seen anything like that11:52
*** ghendi has quit IRC11:52
mcdoncsome other piece of code (or a human in a debugger) would have had to do that11:53
pyqwermcdonc: I think I found the reason: I did a deepcopy() on a located object, so deepcopy() tries to copy the __parent__ etc.11:53
mcdoncpyqwer: yup, persistent objects and deepcopy may not work too well together (esp. if you try to repersist them).11:54
pyqwerSeems so. I replaced deepcopy() by a copy(), hopefully this will work, we'll see.11:55
mcdoncpyqwer: i usually just create a clone method on the thing i'm trying to copy that does something like return self.__class__(...)11:56
*** maurits has joined #zope3-dev11:56
*** yvl has left #zope3-dev11:59
*** quodt has joined #zope3-dev12:02
*** malthe has joined #zope3-dev12:03
*** jukart has quit IRC12:04
*** ignas has quit IRC12:05
* Theuni pokes mcdonc 12:06
mcdonchey, how are ya?12:06
Theunifine12:07
Theuniany chance to get drunken with you at pycon?12:08
mcdoncTheuni: you're gonna go?  cool!12:08
Theunican't miss pycon :)12:08
Theunigonna stay a week in boston before12:08
mcdoncwe shall have beer, then12:08
Theuniw00t!12:08
Theuniabandon all hope, ye who drinke!12:09
mcdonci have to give two talks, both in the first slot, but that never stopped me before12:09
Theuniindeed12:09
Theuniwe could start drinking after the first slot, though12:09
mcdonclol12:09
mcdoncjust dont be making fun of the presenters12:10
* Theuni pokes holes into ZEO12:10
Theuninah12:10
Theuniyou're not a presenter, right? you just happen to be on the stage ;)12:10
mcdonci dont care if you make fun of me, its the other presenters i worry about.. like poor chad whitacre12:11
Theunihttp://www.facebook.com/people/Chad_Whitacre/187701977 ?12:11
mcdonci think we might have had a couple of beers before his talk about some testing thing.. and we were laughing as he showed some video... it only occurred to me later that we were complete assholes ;-)12:12
*** run|home_ has joined #zope3-dev12:12
Theuniwe did?12:12
Theuniinteresting12:12
mcdoncthats him12:12
mcdoncyes, in dallas12:13
*** pelle_ has joined #zope3-dev12:13
Theuniwe're gonna pay for that some day ;)12:13
mcdonche's gonna be our boss someday12:13
*** pelle_ has quit IRC12:13
Theunii'm afraid of that12:14
Theuniespecially if he manages to do that while you're in VA and I'm in Germany12:14
*** pelle_ has joined #zope3-dev12:14
Theunino subversive drinking possible then12:14
Theunisigh12:14
mcdoncperhaps he'd just send us both to romania.12:14
Theunihmm12:15
Theunidrinking and girls it is then12:15
Theunisigh12:15
mcdonci just made my hotel reservations but couldnt get a room at the crowne plaza.  i had to stay at the doubletree.12:15
* Theuni hits ZEO on the head12:15
Theuniouch12:15
mcdoncits right next door12:15
*** run|home has quit IRC12:15
Theuniif you would have told i  probably have a two bed appartment anyway12:15
Theuni.oO(punctuation is overrated)12:16
mcdonctres is showing up at some point too (probably just for sprints)12:16
Theuniyay12:16
Theunii need to do some al capone sight-seeing12:16
*** ghendi has joined #zope3-dev12:16
mcdonci've never been to chicago12:16
mcdoncwell, except the airport12:16
mcdonci need to remember to bring your blueberry syrup12:17
*** __mac__ has joined #zope3-dev12:20
*** __mac___ has quit IRC12:20
*** ignas has joined #zope3-dev12:28
*** mkerrin has joined #zope3-dev12:30
*** jukart has joined #zope3-dev12:37
Theunimcdonc: :)12:40
*** jukart_ has joined #zope3-dev12:53
pyqwermcdonc: Yes, it works now, deepcopy was the reason. Btw., do you know in which circumstances __delitem__ can be used in BTreeContainers?12:56
pyqwerI have a weird problem - I can do a mybtreecontainer['xyz'] = myobj, but when I do a del mybtreecontainer['xyz'], a list(mybtreecontainer) fails, so it's broken.12:57
pyqwerI have to explicitly do a "del mybtreecontainer._SampleContainer__data['xyz']". This is somehow inconsistent, moreover it gives me headaches for security/permission declarations.12:59
*** jukart has quit IRC13:11
fcorreaHello there. I would like to share some code.. err, a problem actually. I am trying to write something that acquires Annotations from the parent in a recursive method. I've debugged and it is actually returning the value when it founds it, but for some reason the attribution fails. Something like: annotations = getAnnotationsFromParent() doesn't work. I've pasted it here http://paste.plone.org/1965713:14
fcorreaIs there something in zope that I can use to got recusivelly up or down in the acquisition stack?13:15
pyqwerI'm no expert but AFAIK, in zope3 things are different than in zope2, so in zope3 there's no acquisition like in zope2.13:16
*** tarek has quit IRC13:16
pyqwerThere is ILocation, though, if that is what you mean.13:16
fcorreapyqwer: This is the same beast from yday. Zope2 + Zope3...I mean, Five13:17
pyqwerfcorrea: Hmmm, sorry, don't know much about Five...13:17
fcorreapyqwer: np13:18
fcorreaI don't even know if this is a Five problem or a programming issue :)13:18
afd_fcorrea: if your method is recursive, why there's a missing "return" at the end?13:18
fcorreaafd_ : But it returs in the firt if I think....or am I missing something?13:19
*** tarek has joined #zope3-dev13:20
fcorreaafd_ : I think I got it :)13:20
afd_maybe you shouldn't test for IAttributeAnnotatable also, test for IAnnotatable13:20
afd_what was it?13:21
pyqwerfcorrea: Hmmm, what about "return self._getAnnotationsFromParent(context=new_context, key=key)"?13:21
fcorreapyqwer, aft_ : I think that was the missing bit. Sorry, my partner is not around and sometimes I need an extra eye to look at my things13:22
fcorreaafd_ : In my zcml I am "Marking" the objects with IAttributeAnnotatable. So you think it will provide IAnnotatable directly?13:23
*** jukart_ has quit IRC13:24
fcorreapyqwer, afd_ : the missing return did the trick ;) Thanks for that man13:24
fcorreasrichter: yt?13:25
pyqwerfcorrea: Well, at least form me, recursion often makes my brain explode. Such errors are common. ;-)13:26
fcorreapyqwer: Everytime I think: "I think I am going to use recursion for this" I remember my college tests....which I failed in all of them. That shows now13:27
*** __mac__ has left #zope3-dev13:34
afd_fcorrea: IAttributeAnnotatable inherits from IAnnotatable, so yes, any annotatable object provides IAnnotatable13:39
*** jukart has joined #zope3-dev13:41
fcorreaafd_ : Ahh...cool13:48
*** projekt01 has joined #zope3-dev13:58
*** niemeyer has joined #zope3-dev14:03
*** rohni has joined #zope3-dev14:17
rohniGood day all.14:17
*** goschtl has quit IRC14:18
rohniI am wondering if there is something like verbose-security = on, for zope3.  A lot of googling has yielded nothing, and I am trying to debug something that I am 99% sure is a permission problem.14:18
afd_rohni: z3 will give you enough details about Unauthorized exceptions, provided that you log them14:19
afd_you have to configure the error utility not to ignore them14:20
ccombpermissions problems are easier to find with   ./bin/paster serve debug.ini14:20
rohniafd_: Ahh, thanks, where would I find this error utility?14:21
afd_in zmi root, the error tab14:21
rohniafd_: I am thinking I need something else in my buildout, to get the paster utility.  J will just check the zmi root.  Thanks for the advice.14:22
*** hazmat has quit IRC14:23
*** hazmat has joined #zope3-dev14:24
*** ChanServ sets mode: +o hazmat14:24
rohniafd_: Thanks, found the error utility, still getting used to the zope3 zmi interface.  It is much prettier, but the zope2's zmi's ugliness had the advantage that everything yelled at you. ;)14:25
rohniafd_: Thanks, thanks, thanks  I have errors galore. :-)14:26
*** regebro has joined #zope3-dev14:32
*** norro has joined #zope3-dev14:33
*** jukart has quit IRC14:52
*** norro_ has joined #zope3-dev14:57
*** norro_ has quit IRC14:57
*** J1m has joined #zope3-dev15:01
*** goschtl has joined #zope3-dev15:03
*** benji has joined #zope3-dev15:07
baijumJ1m, Do you have plan to use PasteScript for the new Buildout recipe for Zope 3 based WSGI application or just PasteDeploy ?15:14
*** alga has joined #zope3-dev15:14
*** jodok has joined #zope3-dev15:15
*** benji has quit IRC15:18
*** benji has joined #zope3-dev15:23
*** jayaraj has quit IRC15:24
*** danielblackburn has joined #zope3-dev15:27
*** danielblackburn has quit IRC15:28
*** danielblackburn has joined #zope3-dev15:34
*** alga_ has joined #zope3-dev15:38
*** goschtl has quit IRC15:41
*** baijum has quit IRC15:42
J1mbaijum, probably, although I haven't decided.15:42
J1mgaaaaa15:42
*** rohanmaini has joined #zope3-dev15:46
*** rohanmaini has left #zope3-dev15:48
*** alga has quit IRC15:51
*** lucielejard has joined #zope3-dev16:04
*** MJ|out is now known as MJ16:10
*** afd_ has quit IRC16:22
*** dobee has quit IRC16:42
*** jodok has quit IRC16:54
*** J1m has quit IRC17:03
*** J1m has joined #zope3-dev17:13
*** romanofski has quit IRC17:21
*** philiKON has joined #zope3-dev17:22
*** tarek_ has joined #zope3-dev17:24
*** tarek has quit IRC17:24
*** tarek_ has quit IRC17:25
*** tarek has joined #zope3-dev17:25
*** philiKON has quit IRC17:28
*** sp0cksbeard has joined #zope3-dev17:29
pyqwerCan someone give me advice for creating a catalog/index?17:30
*** jpfarias_ has joined #zope3-dev17:33
*** jpfarias_ has left #zope3-dev17:33
*** ghendi has quit IRC17:36
*** philiKON has joined #zope3-dev17:38
*** philiKON has quit IRC17:41
*** danielblackburn has quit IRC17:43
*** pcardune has joined #zope3-dev17:45
*** nathany has joined #zope3-dev17:49
*** jodok has joined #zope3-dev17:51
*** rmarianski has joined #zope3-dev17:53
*** sorindregan has quit IRC18:01
*** rohni has quit IRC18:11
*** srichter has quit IRC18:14
*** rmarianski has quit IRC18:15
*** rmarianski has joined #zope3-dev18:15
*** Csiguszinho has joined #zope3-dev18:26
Csiguszinho Hello18:27
*** Csiguszinho has quit IRC18:28
*** danielblackburn has joined #zope3-dev18:29
*** ccomb has quit IRC18:30
*** ccomb has joined #zope3-dev18:31
*** pelle__ has joined #zope3-dev18:32
*** jodok has quit IRC18:33
*** pelle__ has quit IRC18:33
*** pcardune has quit IRC18:33
*** jodok has joined #zope3-dev18:34
*** run|home_ has quit IRC18:35
*** acsr has quit IRC18:40
*** jodok_ has joined #zope3-dev18:43
*** pelle_ has quit IRC18:49
*** maurits has quit IRC18:54
*** whit is now known as whit|coffee18:55
*** aCiDBaSe has quit IRC18:57
*** mgedmin has joined #zope3-dev18:58
*** jodok has quit IRC19:00
*** philiKON has joined #zope3-dev19:04
*** J1m has quit IRC19:06
*** jodok_ has quit IRC19:10
*** menesis has quit IRC19:14
*** acsr has joined #zope3-dev19:15
*** quodt has quit IRC19:15
*** pcardune has joined #zope3-dev19:16
*** pcardune has quit IRC19:19
*** harobed has quit IRC19:21
*** rmarianski has quit IRC19:21
*** rmarianski has joined #zope3-dev19:21
*** rmarianski has quit IRC19:25
*** rocky has quit IRC19:28
*** J1m has joined #zope3-dev19:28
*** tarek has quit IRC19:34
*** projekt01 has quit IRC19:42
*** jpcw2002 has left #zope3-dev19:42
*** ccomb has quit IRC19:48
*** danielblackburn has quit IRC19:49
*** ignas has quit IRC19:56
*** jayaraj has joined #zope3-dev20:02
*** davidstryker has joined #zope3-dev20:04
*** davidstryker has left #zope3-dev20:04
*** jayaraj has quit IRC20:07
*** whit|coffee is now known as whit20:08
*** mkerrin has quit IRC20:09
*** alecm has joined #zope3-dev20:19
*** RaFromBRC has joined #zope3-dev20:30
*** RaFromBRC has quit IRC20:31
*** RaFromBRC has joined #zope3-dev20:32
*** danielblackburn has joined #zope3-dev20:43
*** srichter has joined #zope3-dev20:46
*** ChanServ sets mode: +o srichter20:50
*** malthe has quit IRC20:50
*** alga_ has quit IRC20:51
*** tarek has joined #zope3-dev21:03
*** rmarianski has joined #zope3-dev21:04
*** whitmo has joined #zope3-dev21:05
*** danielblackburn has quit IRC21:13
*** whitmo_ has joined #zope3-dev21:15
*** malthe has joined #zope3-dev21:16
*** whit has quit IRC21:17
*** dunny has joined #zope3-dev21:18
*** whitmo has quit IRC21:22
*** jukart has joined #zope3-dev21:31
*** whitmo_ has quit IRC21:33
*** jukart_ has joined #zope3-dev21:38
*** J1m has quit IRC21:39
*** J1m has joined #zope3-dev21:43
*** whitmo____ has joined #zope3-dev21:45
*** ccomb has joined #zope3-dev21:45
*** malthe_ has joined #zope3-dev21:48
*** malthe has quit IRC21:48
*** afd_ has joined #zope3-dev21:48
*** J1m has quit IRC21:51
*** J1m has joined #zope3-dev21:52
*** sm has quit IRC21:52
*** jukart_ has quit IRC21:52
*** jukart has quit IRC21:55
*** whitmo____ has quit IRC22:01
*** danielblackburn has joined #zope3-dev22:06
*** danielblackburn has quit IRC22:21
*** markusleist has quit IRC22:22
*** danielblackburn has joined #zope3-dev22:23
*** rmarianski has quit IRC22:59
*** rmarianski has joined #zope3-dev23:00
*** danielblackburn has quit IRC23:00
*** toutpt has joined #zope3-dev23:02
toutpthi23:06
toutpti m just have setting up a zope3 instance, i would like to plug it to my apache23:06
toutpti have find two ways of doing it : rewrite or virtualhost23:07
toutptis there a best one ?23:07
mgedminwhat's the difference?23:07
*** whit has joined #zope3-dev23:07
toutptthis is my question in fact23:07
mgedmintypical zope3 under apache is a rewrite rule inside an apache's <VirtualHost> section, and the rewrite rule itself uses zope's ++vh++ namespace to tell zope the name of the virtual host23:08
mgedminsomething like23:09
mgedminRewriteRule ^/(.*) http://localhost:8080/++vh++http:yourhostname:80/++/$1 [R,L]23:09
toutptwell, that s make it more clear for me23:09
mgedminsorry!23:09
mgedminRewriteRule ^/(.*) http://localhost:8080/++vh++http:yourhostname:80/++/$1 [P,L]23:09
mgedminyou also need to enable apache's mod_proxy and mod_rewrite23:09
toutpti have read that rewrite is slow23:10
toutptin a very old doc23:10
mgedminI have heard that putting zope 3 without apache in front of it is unsecure23:10
toutptfor sure, i don't want an other web server than apache in front of my server23:10
toutptthank you mgedmin23:11
mgedminnp23:11
mgedminfwiw when you'll decide you want an https version, the rule is23:11
mgedminRewriteRule ^/(.*) http://localhost:8080/++vh++https:yourhostname:443/++/$1 [P,L]23:11
pyqwerDoes someone know what this error is about?23:13
pyqwer  File "/local/home/dusty/Zope-3.4.0c1/lib/python/zope/app/keyreference/persistent.py", line 39, in __init__23:13
pyqwer    raise zope.app.keyreference.interfaces.NotYet(object)23:13
pyqwerNotYet: <zfym_tennis.match.ZMatch object at 0x413a938>23:13
pyqwerI tried to register an object with an IIntIds utility, maybe something is missing here?23:14
philiKONyup23:14
philiKONyou need to make sure it knows which database it'll be added to23:14
philiKONgive it some __parent__ linkage to an already persisted object23:15
philiKONor explicitly add it to the respective zodb database23:15
philiKONiirc, something like  some_obj_thats_in_the_same_database._p_jar.add(your_obj)23:15
pyqwerAh, ok, so I thought I should do that the other way round, let me see...23:16
philiKONRMFB :)23:17
pyqwerphiliKON: Ah, it seems to have worked now, thanks! Now let's see if the object was added to the index...23:18
pyqwerYes, I have the FB in front of me ;-)23:18
pyqwerHmmm, it's not added. :-(23:20
pyqwerphiliKON: Do I have to set up a subscriber for the catalog so that if I do iints.register(myobj), the catalog/index is updated?23:23
philiKONshrug, why are you doing the registration manually?23:24
philiKONyou could simply send an ObjectAddedEvent23:24
pyqwerBecause I don't use the ZMI. The only thing I do is add my site via the ZMI, and the setup routine should register everything automatically.23:25
philiKONwhat does this have to do with the zmi23:25
pyqwerHmmm, you said "manually", therefore I thought you ment "not via ZMI".23:25
philiKONtypically, when you send an ObjectAddedEvent, everything happens automatically23:26
pyqwerWon't the ObjectAddedEvent automatically be sent when I add some object to the ZODB?23:26
philiKONregistration in the intid utilty23:26
philiKONregistration with any indices23:26
philiKONetc.23:26
philiKONno, it won't23:26
philiKONit's sent when you add something to a container23:26
philiKONbut i suspect you aren't23:26
philiKONhmm, ObjectAddedEvents are actually about adding stuff to a container23:26
philiKONso maybe they're the wrong kind of event here23:26
philiKONeither way, when you register something with the intid utility, nothing will be done automatically after that23:27
philiKONif you want to get the object indexed, you need to tell any catalogs as well23:27
pyqwerYes, right. I have a Container and I'm adding an object. But wait, I first add it (which fires the event) and then I do a iintids.register(myobj).23:27
pyqwerSo perhaps the event comes too late?23:27
philiKONyou shouldn't have to do that registration yourself23:27
philiKONtoo late for what?23:27
philiKONsome_container['foo'] = your_object() will send that event23:28
philiKONbut then again, it should also get your_object().__parent__23:28
pyqwerAh, ok, that's your point - I don't have to do the registration. Hmmm.23:28
philiKONwhich it apparently didn't before23:28
*** redir has joined #zope3-dev23:28
*** d2m has quit IRC23:28
philiKONso it seems your container isn't really performing according to IContainer23:28
pyqwerBecause this is what I read in the doctests: >>> d1 = Dummy(u'one') >>> id1 = intids.register(d1) >>> catalog.indexDocSubscriber(IntIdAddedEvent(d1, None))23:29
philiKONwell, this then is more of a test than 'doc'23:29
philiKONthis isn't how you should use intids23:29
pyqwerHmmm, or my IIntids / catalog / indexes are not set up correctly.23:29
philiKONdude, i explained all this in my book23:29
pyqwerWell, sorry, but I didn't get it in your book - you wrote about a fulltext search, but I need to index single attributes.23:30
philiKONwell, that's a minor detail here isn't it.23:30
philiKONthat's just a different kind of index you pop into the catalog23:30
pyqwerYes, I thought so, too. The setup is all the same, only that I have another Index class (which I merely copied from the catalog-doctest) and plug into the catalog.23:31
philiKONuh huh... so you implemented your own index?23:32
pyqwerYes, I have to, don't I?23:32
philiKONuh... no?!?23:32
philiKONi don't implement my own full text index in the book, do i?23:32
mgedminpyqwer: does your object provide IContained?23:33
*** aCiDBaSe has joined #zope3-dev23:33
*** jukart has joined #zope3-dev23:33
mgedminif not, you'll get this error23:33
mgedmincontainers only set the __parent__ attribute to objects that provide IContained23:33
philiKONshouldn't it work with other kinds of objects, too?23:34
philiKONafter all, the container will put a containedproxy around it23:34
pyqwerAh, it did not, it does implement ILocation, though (and I manually locate the object via "locate()")23:35
philiKONshrug23:35
philiKONmake it provide IContained then23:35
philiKONit's the same as ILocation23:35
philiKONplus that added notion of "i'm in a container"23:35
philiKONyou shouldn't have to locate it yourself23:35
philiKONthe container does that23:35
philiKONin fact, if it already provides ILocation, *IIRC* the container will apply IContained on it23:36
*** seba870 has joined #zope3-dev23:36
pyqwerChanged it to IContainer, no much difference, though.23:36
philiKONyup:23:36
philiKON    if not IContained.providedBy(object):23:36
philiKON        if ILocation.providedBy(object):23:36
philiKON            zope.interface.alsoProvides(object, IContained)23:36
*** jukart_ has joined #zope3-dev23:36
philiKONpyqwer: it seems you're doing a lot of things manually that are done by the framework23:36
mgedminah23:37
philiKONlike putting things into the object hierarchy (__parent__) and  regstering things with different kinds of utilities (intid, catalog, etc.)23:37
*** mgedmin has quit IRC23:37
seba870 salut23:37
seba870 y a qq un?23:37
pyqwerphiliKON: Ah, ha! If I don't call locate() before adding the object to the container, the index routine is called. (Which raises an error, but that's another topic).23:39
*** seba870 has quit IRC23:40
pyqwerphiliKON: YES! And now the object is added to my index. One more question: If I don't write the index for myself, what index class should I use for a simple attribute index? I need to index simple string attributes but also a list attribute where a search should match if one item is found in the list.23:43
*** srichter has quit IRC23:43
philiKONzc.catalog's ValueIndex23:43
philiKONiirc23:43
*** afd_ has quit IRC23:44
pyqwerAh, nice, didn't know about that, thanks!23:44
*** jukart has quit IRC23:53

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!