*** ktwilight has quit IRC | 00:10 | |
*** ktwilight has joined #zope3-dev | 00:14 | |
*** reco has quit IRC | 00:18 | |
*** harobed has quit IRC | 00:18 | |
*** ianbicking has joined #zope3-dev | 00:31 | |
timte | I see two different patterns in code. | 00:37 |
---|---|---|
timte | from zope import component | 00:38 |
timte | component.provideAdapter(...) | 00:38 |
timte | or | 00:38 |
timte | from zope.component import provideAdapter(...) | 00:38 |
timte | provideAdapter(...) | 00:38 |
timte | What's preferred? | 00:38 |
*** ktwilight has quit IRC | 00:41 | |
*** ktwilight has joined #zope3-dev | 00:42 | |
*** natea has joined #zope3-dev | 00:52 | |
*** ktwilight has joined #zope3-dev | 00:55 | |
*** timte has quit IRC | 01:04 | |
*** ErikRose has quit IRC | 01:06 | |
*** dlk has left #zope3-dev | 01:14 | |
*** ofer has quit IRC | 01:18 | |
*** benji has quit IRC | 01:19 | |
*** ktwilight has quit IRC | 01:21 | |
*** edgordon_ has joined #zope3-dev | 01:29 | |
*** dobee has quit IRC | 01:46 | |
*** edgordon_ has quit IRC | 01:48 | |
*** ErikRose_ has joined #zope3-dev | 01:59 | |
*** ofer has joined #zope3-dev | 02:04 | |
*** edgordon has joined #zope3-dev | 02:06 | |
*** ErikRose_ has quit IRC | 02:12 | |
*** J1m has quit IRC | 02:18 | |
*** flox has quit IRC | 02:19 | |
*** dunny has quit IRC | 03:09 | |
*** ofer has quit IRC | 03:23 | |
*** philiKON has joined #zope3-dev | 03:27 | |
*** batlogg has joined #zope3-dev | 03:28 | |
*** batlogg has quit IRC | 03:30 | |
*** wrobel has quit IRC | 03:41 | |
*** edgordon has quit IRC | 03:41 | |
*** vlado has joined #zope3-dev | 05:17 | |
*** alecm has quit IRC | 05:31 | |
*** benji has joined #zope3-dev | 05:34 | |
*** alecm has joined #zope3-dev | 05:37 | |
*** yota has quit IRC | 05:39 | |
*** niemeyer has quit IRC | 07:00 | |
febb | hello all ! | 07:36 |
*** febb has quit IRC | 08:03 | |
*** natea_ has joined #zope3-dev | 08:10 | |
*** natea has quit IRC | 08:21 | |
*** alecm has quit IRC | 08:31 | |
*** timte has joined #zope3-dev | 08:39 | |
*** natea_ has quit IRC | 09:34 | |
*** dobee has joined #zope3-dev | 10:41 | |
*** ktwilight has joined #zope3-dev | 10:56 | |
*** ktwilight_ has joined #zope3-dev | 11:16 | |
*** ktwilight has quit IRC | 11:26 | |
*** ktwilight_ is now known as ktwilight | 11:26 | |
*** ktwilight_ has joined #zope3-dev | 11:36 | |
*** dlk has joined #zope3-dev | 11:36 | |
*** ktwilight has quit IRC | 11:38 | |
*** ktwilight_ is now known as ktwilight | 11:38 | |
*** harobed has joined #zope3-dev | 11:41 | |
*** ktwilight_ has joined #zope3-dev | 11:45 | |
*** dobee has quit IRC | 11:50 | |
*** ktwilight has quit IRC | 11:52 | |
*** harobed has quit IRC | 11:54 | |
*** harobed has joined #zope3-dev | 11:54 | |
*** ktwilight has joined #zope3-dev | 11:57 | |
*** flox has joined #zope3-dev | 12:01 | |
*** jukart has joined #zope3-dev | 12:05 | |
*** ktwilight_ has quit IRC | 12:10 | |
*** ktwilight_ has joined #zope3-dev | 12:16 | |
*** ktwilight has quit IRC | 12:24 | |
*** ktwilight_ is now known as ktwilight | 12:24 | |
harobed | philiKON: you are here ? | 12:26 |
*** jukart has quit IRC | 12:33 | |
*** vlado has quit IRC | 12:35 | |
timte | If I add and register a utility using zmi, shouldn't I be able to queryUtility(IMyInterface, 'utilityname') ? | 12:44 |
timte | it returns None | 12:44 |
*** ktwilight has quit IRC | 12:49 | |
*** flox has quit IRC | 13:01 | |
philiKON | timte, sure, but only in that site | 13:02 |
timte | I use the default one | 13:02 |
philiKON | oh, and 'utilityname' has to be the name with which you registered the utility | 13:02 |
timte | yes it is | 13:03 |
philiKON | not the URL name of the object | 13:03 |
philiKON | harobed, yes, what is it | 13:03 |
timte | zmi registration says "events.interfaces.IEventUtility utility named 'eventtool'" | 13:04 |
timte | queryUtility(IEventUtility, 'eventtool') returns None though | 13:04 |
philiKON | where do you do the queryUtility call? | 13:04 |
timte | does queryUtility know which site to look in? | 13:04 |
timte | in a zopectl debug session | 13:05 |
philiKON | it knows after traversal | 13:05 |
philiKON | well, that's your problem | 13:05 |
philiKON | you haven't traversed to anything yet | 13:05 |
philiKON | how would it know where to look | 13:05 |
philiKON | you need to imitate traversal to the site | 13:05 |
timte | that's what the magic of zope should solve ;) | 13:05 |
philiKON | there's no magic | 13:05 |
philiKON | from zope.app.component.site import setSite | 13:05 |
philiKON | setSite(root) | 13:06 |
timte | cool, it works | 13:07 |
timte | thanks | 13:08 |
timte | Does it make sense to store events in an event utility? To me it doesn't make sense to store them in a certain folder, I think they should be placeless and then I think of utiliities. | 13:09 |
*** baijum has joined #zope3-dev | 13:11 | |
philiKON | what kind of events? | 13:12 |
timte | content types with start, end and location | 13:15 |
*** jukart has joined #zope3-dev | 13:21 | |
philiKON | timte, doesn't feel like a utility to me | 13:28 |
philiKON | but it's your call :) | 13:28 |
timte | certainly :) | 13:32 |
timte | but I don't know what alternatives there are | 13:32 |
harobed | philiKON: you are see that http://mail.zope.org/pipermail/zope3-users/2006-September/004646.html | 13:33 |
philiKON | harobed, read the docs! | 13:33 |
philiKON | you're asking many many questions that are answered by the docs | 13:34 |
harobed | ok, I read | 13:34 |
*** zagy has joined #zope3-dev | 13:35 | |
philiKON | harobed, please don't ask further questions till you have read the docs | 13:35 |
timte | what are the alternatives? Is there any other alternative than storing them in a certain event-folder? | 13:36 |
philiKON | store them where you want | 13:36 |
philiKON | it all depends on your use case | 13:36 |
timte | it's not a folder users are meant to visit | 13:37 |
harobed | philiKON: I read zope/app/keyreference/persistent.txt but I don't solve my issue | 13:37 |
harobed | documentation is very scatter | 13:38 |
philiKON | persistent.txt explain NotYet | 13:38 |
harobed | yes, I know, but in my last test I use ztapi.provideAdapter(IPersistent, IConnection, connectionOfPersistent) | 13:39 |
harobed | and it doesn't work | 13:39 |
philiKON | you have to save your object in the zodb first (e.g. transaction.commit() or transaction.savepoint()), or have its __parent__ be a saved object | 13:39 |
philiKON | harobed, don't use ztapi | 13:39 |
philiKON | harobed, documentation is not scattered, it's collectedin the apidoc book | 13:41 |
harobed | ok, I'm going study | 13:42 |
*** ofer has joined #zope3-dev | 13:43 | |
harobed | I think than I don't understand the base of Zope 3 | 13:44 |
harobed | I'm going to reread persistent layer | 13:44 |
philiKON | whatever | 13:45 |
*** jukart has quit IRC | 13:52 | |
*** jukart has joined #zope3-dev | 14:38 | |
*** zagy has quit IRC | 14:38 | |
*** dunny has joined #zope3-dev | 15:00 | |
*** flox has joined #zope3-dev | 15:19 | |
*** mexiKON has joined #zope3-dev | 15:25 | |
*** projekt01 has joined #zope3-dev | 15:26 | |
projekt01 | benji, ayt | 15:27 |
*** jukart has quit IRC | 15:28 | |
projekt01 | Does anybody know why a Data.fs generated during generation tests is 4 times bigger on linux then on windows? | 15:29 |
*** philiKON has quit IRC | 15:33 | |
*** jukart has joined #zope3-dev | 15:33 | |
*** regebro has joined #zope3-dev | 15:38 | |
*** rocky|away has quit IRC | 15:42 | |
*** rocky has joined #zope3-dev | 15:46 | |
*** ofer has quit IRC | 15:54 | |
*** jukart has quit IRC | 15:56 | |
*** natea has joined #zope3-dev | 16:01 | |
*** baijum has quit IRC | 16:03 | |
romanofski | moin :) | 16:10 |
*** projekt01 has left #zope3-dev | 16:16 | |
*** regebro has quit IRC | 16:22 | |
*** regebro has joined #zope3-dev | 16:23 | |
*** alecm has joined #zope3-dev | 16:41 | |
*** batlogg has joined #zope3-dev | 16:42 | |
*** natea is now known as natea|away | 16:48 | |
*** dobee has joined #zope3-dev | 16:52 | |
*** yota has joined #zope3-dev | 16:58 | |
*** natea|away has quit IRC | 17:30 | |
*** natea has joined #zope3-dev | 17:33 | |
*** dunny has quit IRC | 17:50 | |
*** regebro has quit IRC | 18:01 | |
*** jukart has joined #zope3-dev | 18:16 | |
*** jkakar has quit IRC | 18:22 | |
*** batlogg has quit IRC | 18:24 | |
*** batlogg has joined #zope3-dev | 18:25 | |
*** mexiKON is now known as philiKON | 18:26 | |
*** tonico has joined #zope3-dev | 18:33 | |
*** regebro_ has joined #zope3-dev | 19:57 | |
*** regebro_ is now known as regebro | 19:57 | |
*** flox has quit IRC | 19:59 | |
*** Aiste has quit IRC | 20:00 | |
*** MiUlEr has joined #zope3-dev | 20:01 | |
timte | what is this a symtom of? | 20:03 |
timte | TypeError: ('object.__new__(Event) is not safe, use persistent.Persistent.__new__()', <function _reconstructor at 0xb7e0d064>, (<class 'events.event.Event'>, <type 'object'>, None)) | 20:03 |
benji | timte: it doesn't appear that persistent objects are meant to be used that way | 20:06 |
timte | my Event class inherited from object before, but I changed to Persistent | 20:07 |
radix | did you fix all the upcalls? | 20:07 |
timte | what? | 20:08 |
MiUlEr | hi | 20:08 |
radix | timte: upcalling is when you call a superclass' method from an overridden method | 20:08 |
timte | radix: ah, I have an init method without an upcall, maybe that's what | 20:09 |
timte | what's wrong | 20:09 |
*** regebro has quit IRC | 20:13 | |
timte | It was caused by me changing the superclass method. It didn't like that. | 20:15 |
timte | Do you have to write migration scripts if you choose a new superclass to inherit from? | 20:16 |
d2m | i get this when running from a custom site.conf "ConfigurationError: ('Invalid value for', 'menu', "ImportError: Couldn't import zmi_views, No module named zmi_views")" -- any hints what to include to make that go away ? | 20:19 |
*** jukart has quit IRC | 20:20 | |
d2m | the error is triggered from a <page ... menu="zmi_views"> directive | 20:21 |
timte | what if you specify browser:page? | 20:22 |
d2m | i already did <include package="zope.app.publisher.browser" file="meta.zcml" />, but "zmi_views" is defined somewhere a place i could not find so far | 20:24 |
radix | timte: generally, you need to migrate data when assumptions about data change. it's not unlikely at all that changing which superclass to use for a class will change assumptions about data. | 20:24 |
timte | bah, I renamed my utility to IEventUtility, now when I want to add an Event it thinks I want to add EventUtility | 20:24 |
timte | radix: I have no idea how to write such migration scripts though :/ | 20:26 |
*** flox has joined #zope3-dev | 20:26 | |
timte | d2m: what happens if you add the browser namespace in the configure tag? | 20:31 |
*** harobed has quit IRC | 20:32 | |
d2m | timte: its already there, as default namespace of the included config file | 20:34 |
d2m | i think there is a machinery setting up zmi_views (and zmi_actions) that is not done through configuration | 20:35 |
philiKON | d2m, is this in five? | 20:35 |
d2m | no, i 'simply' try to bootstrap a site.conf in order to a songle package (apidocs) running | 20:36 |
d2m | so i created an site.conf, only included the "zopeskel/etc/package-includes/apidoc-*.zcml" files and now try to include all dependencies to get the config run | 20:38 |
philiKON | right. you need to define the zmi_views menu | 20:38 |
philiKON | <browser:menu name="zmi_views" /> or something like that | 20:39 |
timte | "This object isn't yet registered." | 20:39 |
timte | What does this mean? | 20:39 |
philiKON | it's not registered as a local utility yet | 20:42 |
d2m | philiKON: cool, <browser:menu id="zmi_views" /> did it so far, thanks | 20:42 |
philiKON | np | 20:42 |
*** regebro has joined #zope3-dev | 20:42 | |
timte | but it's a content type I'm trying to add, not a utility | 20:43 |
philiKON | then don't register it :) | 20:43 |
timte | but it suggests me to, that's confusing :) | 20:43 |
philiKON | then disable it | 20:44 |
philiKON | you can register it any object | 20:44 |
philiKON | so that's why the view is there for all objects | 20:44 |
philiKON | just like you could use <utility /> with any object | 20:45 |
timte | ok, so if I don't have a "view" view, then I get the registration view | 20:45 |
timte | can the registration view be disable for all objects that are not utilities? | 20:46 |
philiKON | how would you know it's a utility? | 20:46 |
timte | utilities are specified in zcml, no? | 20:47 |
philiKON | local utilities aren't | 20:47 |
philiKON | not necessarily at least | 20:47 |
timte | oh | 20:48 |
philiKON | that's what the Registration tab is for, dude | 20:48 |
philiKON | registering an object as a local utility | 20:48 |
timte | I see | 20:49 |
regebro | OK, having the local registration view end up as default may not be very intuitive. Maybe we should fix that. | 20:56 |
regebro | Like when you get the undo-screen in the ZMI because you haven't defined anything else. :) | 20:56 |
* regebro has 2 cents | 20:57 | |
*** regebro has quit IRC | 20:57 | |
*** dobee has quit IRC | 21:01 | |
*** batlogg has quit IRC | 21:11 | |
*** batlogg has joined #zope3-dev | 21:30 | |
*** alecm has quit IRC | 21:30 | |
*** russf has joined #zope3-dev | 21:40 | |
*** ktwilight has joined #zope3-dev | 21:40 | |
*** RaFromBRC has quit IRC | 21:46 | |
*** Aiste has joined #zope3-dev | 22:02 | |
*** ktwilight has quit IRC | 22:02 | |
*** alecm has joined #zope3-dev | 22:10 | |
*** alecm has quit IRC | 22:19 | |
*** jukart has joined #zope3-dev | 22:20 | |
rocky | anyone know if i can use multiple component.adapts() lines to adapt multiple interfaces individually ? | 22:22 |
rocky | zope.component.adapts() | 22:22 |
*** alecm has joined #zope3-dev | 22:24 | |
philiKON | no | 22:28 |
rocky | that's too bad | 22:28 |
philiKON | adapts(), implements() etc. can only occur ones | 22:28 |
philiKON | once | 22:28 |
philiKON | yup | 22:28 |
benji | rocky: if it's technically possible, I'm sure that feature would be accepted if you want to add it | 22:29 |
*** ktwilight has joined #zope3-dev | 22:33 | |
rocky | indeed | 22:41 |
*** batlogg has quit IRC | 22:44 | |
*** ktwilight has quit IRC | 22:52 | |
*** dunny has joined #zope3-dev | 23:21 | |
*** jinty has joined #zope3-dev | 23:32 | |
*** ofer has joined #zope3-dev | 23:35 | |
*** jukart has quit IRC | 23:37 | |
*** timte has quit IRC | 23:49 | |
*** oggers has joined #zope3-dev | 23:51 | |
*** MiUlEr has quit IRC | 23:55 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!