*** dobee has quit IRC | 00:04 | |
*** gumpa has left #zope3-dev | 00:13 | |
*** romanofski is now known as rom|zZZ | 00:24 | |
*** wrobel has quit IRC | 00:38 | |
*** tiredbones has quit IRC | 00:38 | |
*** tiredbones has joined #zope3-dev | 00:38 | |
*** bradb has joined #zope3-dev | 00:55 | |
*** benji has quit IRC | 01:05 | |
*** d21 has joined #zope3-dev | 01:23 | |
*** d2m has quit IRC | 01:25 | |
*** yota has quit IRC | 01:47 | |
*** jinty has quit IRC | 02:07 | |
*** torkel_ has joined #zope3-dev | 02:38 | |
*** elro has joined #zope3-dev | 02:54 | |
*** hazmat has quit IRC | 03:12 | |
*** TresEquis has joined #zope3-dev | 03:15 | |
*** hazmat has joined #zope3-dev | 03:19 | |
*** ChanServ sets mode: +o hazmat | 03:19 | |
*** rocky is now known as rocky|Zzz | 03:24 | |
*** elro has quit IRC | 03:27 | |
*** torkel_ has quit IRC | 03:28 | |
*** TresEquis has quit IRC | 05:06 | |
*** niemeyer has quit IRC | 05:46 | |
*** robyg has joined #zope3-dev | 06:51 | |
*** hazmat has quit IRC | 07:43 | |
*** hazmat has joined #zope3-dev | 07:46 | |
*** ChanServ sets mode: +o hazmat | 07:46 | |
*** bradb has quit IRC | 07:50 | |
*** robyg has quit IRC | 07:51 | |
*** bradb has joined #zope3-dev | 07:53 | |
*** eins has joined #zope3-dev | 08:07 | |
*** dobee has joined #zope3-dev | 08:13 | |
*** wrobel has joined #zope3-dev | 08:20 | |
*** alecm has quit IRC | 08:26 | |
*** bradb has quit IRC | 08:29 | |
*** bradb has joined #zope3-dev | 08:32 | |
*** Aiste has joined #zope3-dev | 08:47 | |
*** bradb has quit IRC | 08:53 | |
*** xenru has joined #zope3-dev | 08:54 | |
*** bradb has joined #zope3-dev | 08:56 | |
*** d21 has quit IRC | 08:59 | |
*** hdima has joined #zope3-dev | 09:10 | |
*** flox has quit IRC | 09:14 | |
*** batlogg has quit IRC | 09:22 | |
*** d2m has joined #zope3-dev | 09:28 | |
*** philiKON has quit IRC | 09:37 | |
*** Aiste has quit IRC | 09:38 | |
*** projekt01 has joined #zope3-dev | 09:41 | |
*** romanofski has joined #zope3-dev | 09:41 | |
*** romanofski has quit IRC | 09:50 | |
*** romanofski has joined #zope3-dev | 09:51 | |
*** batlogg has joined #zope3-dev | 09:52 | |
romanofski | morjens | 09:58 |
---|---|---|
*** batlogg has joined #zope3-dev | 10:08 | |
*** flox has joined #zope3-dev | 10:10 | |
*** Aiste has joined #zope3-dev | 10:11 | |
*** philiKON has joined #zope3-dev | 10:12 | |
*** Aiste has quit IRC | 10:15 | |
*** yota has joined #zope3-dev | 10:21 | |
*** kobold has joined #zope3-dev | 10:36 | |
*** xenru has quit IRC | 10:39 | |
*** xenru has joined #zope3-dev | 10:40 | |
*** romanofski has quit IRC | 10:45 | |
*** hazmat has quit IRC | 10:48 | |
*** hazmat has joined #zope3-dev | 10:51 | |
*** ChanServ sets mode: +o hazmat | 10:51 | |
*** romanofski has joined #zope3-dev | 10:54 | |
*** timte has joined #zope3-dev | 11:28 | |
*** flox has quit IRC | 11:29 | |
*** hazmat has quit IRC | 11:31 | |
*** ignas has joined #zope3-dev | 12:15 | |
tlotze | hi | 12:18 |
tlotze | still wondering about zope.app.container stuff... | 12:18 |
tlotze | this time the containment constraints | 12:19 |
tlotze | Is there any special reason why constraints on container types and types of items in a container are expressed in such different way? | 12:19 |
philiKON | tlotze, what do you mean? | 12:20 |
tlotze | Especially the fact that the container type constraint is a Field on the contained interface is a bit annoying, since it keeps interfering with any other schema fields on the interface it is used on. | 12:20 |
philiKON | well, it is a constraint on the __parent__ field | 12:21 |
philiKON | i think that makes sense | 12:21 |
philiKON | if you want to avoid interference, put the constraint on a different interface | 12:21 |
tlotze | The trouble is that __parent__ is a field at all. | 12:21 |
tlotze | sure | 12:21 |
philiKON | IRecipe has the normal fields and IRecipeCOntained has the __parent__ field | 12:21 |
tlotze | but that leads to a lot of small interfaces which exists for a purely technical reason | 12:21 |
philiKON | you're trying to express a technical thing :) | 12:22 |
tlotze | hm | 12:22 |
tlotze | dunno | 12:22 |
philiKON | note that the "interference" can easily be avoided, too | 12:22 |
philiKON | when in formlib, just omit __arent__ and __name__ | 12:22 |
philiKON | for example | 12:22 |
tlotze | but it feels a little awkward having to do this | 12:23 |
tlotze | I mean, you have no choice whether to exclude __parent__, for example. | 12:23 |
philiKON | what do you mean? | 12:23 |
tlotze | There's simply no widget for it, so formlib will bomb if you forget to exclude it. | 12:23 |
philiKON | so? | 12:23 |
philiKON | exlude it :) | 12:24 |
tlotze | That's what I feel is awkward. | 12:24 |
philiKON | form_fields = Fields(IRecipe).omit('__parent__', '__name__') | 12:24 |
tlotze | Having to express things which don't give me a choice anyway. | 12:24 |
philiKON | why not | 12:24 |
philiKON | there could be a widget for __parent__ | 12:24 |
philiKON | perhaps someone has that use case | 12:24 |
philiKON | formlib and containment are orthogonal | 12:24 |
* tlotze tr4ies to imagine one... | 12:25 | |
philiKON | zope.schema.Object has a widget | 12:25 |
philiKON | for example :) | 12:25 |
tlotze | phew | 12:25 |
philiKON | anyways, you could of course register a null-widget | 12:25 |
philiKON | for __parent__ | 12:25 |
tlotze | I mean, strictly speaking, you're right. | 12:25 |
philiKON | but that seems hardly worht the effort | 12:25 |
tlotze | It's just that I find code littered with these containment interfaces which all look the same - not very elegant, I feel. | 12:26 |
philiKON | i think it depends on the way you want to express things | 12:27 |
philiKON | if you can imagine recipes that aren't contained, splitting it up is ok i think | 12:27 |
philiKON | IRecipe expresses recipe data | 12:27 |
philiKON | IREcipeContained expresses how recipes fit into the hierarchy in a particular app | 12:28 |
MJ | philiKON: Nice solution to the virtual host prob | 12:28 |
MJ | philiKON: I take it you'll need to assign the custom IVirtualHostRoot interface to the folder traversed? | 12:29 |
tlotze | philiKON, sure | 12:29 |
MJ | (you didn't say in your email) | 12:29 |
philiKON | MJ, yeah, forgot to say that | 12:29 |
philiKON | MJ, feel free to reply | 12:29 |
tlotze | It's just so wordy... | 12:29 |
* MJ closed the browser already.. | 12:29 | |
MJ | Sorry, I am about to leave, so I can't. | 12:30 |
philiKON | tlotze, true. what are you suggesting though? | 12:30 |
philiKON | i mean, the inteference in formlib, etc. can be dealt with by either explicitly omitting the fields | 12:31 |
philiKON | or by writing helpers that do that | 12:31 |
philiKON | so you don't have to do it all the time | 12:31 |
philiKON | other than that i'd be happyt o listen to suggestions ;) | 12:31 |
tlotze | I'd have suggested using an Attribute instead of a Field, or maybe something involving a method - anything that doesn't get in the way of schemas. | 12:32 |
philiKON | Attribute has no way of specifying constraints | 12:32 |
philiKON | we want to express a constraint | 12:32 |
philiKON | that's what schemas are there for | 12:32 |
philiKON | schema fields that is | 12:32 |
philiKON | expressing constraints | 12:32 |
philiKON | the fact that you can make forms out of them is just *one* application of schemas | 12:32 |
philiKON | as you see, containment constraints is another one | 12:32 |
tlotze | It's admittedly an elegant and clean design. | 12:33 |
philiKON | i think so too | 12:33 |
tlotze | It just ends up yielding wordy code in simple use cases. | 12:33 |
philiKON | i sort of agree | 12:33 |
eins | did any body succeed to use different sqlalchemy engines for different instances of objects of the same class? is it possible at all? | 12:33 |
tlotze | philiKON, if we accept using a Field for __parent__, why not use a Field for contained items? Why stick that constraint to a method? | 12:35 |
philiKON | which field would you use? | 12:36 |
philiKON | containers don't store their contained objects in attributes | 12:36 |
philiKON | they use __setitem__ | 12:36 |
philiKON | so we have a precondition for __setitem__ | 12:36 |
philiKON | the precondition says: only foo bojects allowed | 12:36 |
tlotze | technically it's clear | 12:36 |
tlotze | hm | 12:37 |
tlotze | right | 12:37 |
tlotze | Just caught myself in time before over-generalizing thing | 12:37 |
tlotze | s | 12:37 |
tlotze | ;o | 12:37 |
tlotze | ) | 12:37 |
tlotze | narf | 12:37 |
*** jinty has joined #zope3-dev | 12:37 | |
*** kobold has quit IRC | 12:38 | |
philiKON | tlotze, ;) | 12:38 |
philiKON | tlotze, btw, the precondition system allows you to write very flexible preconditions | 12:39 |
philiKON | such as: this container only takes persistent objects | 12:39 |
tlotze | sure | 12:39 |
philiKON | (of course, that could still be expressed with the interface-based one, using IPersistent) | 12:40 |
philiKON | just giving an example | 12:40 |
tlotze | another wild idea: what about __setparent__()? Setting the precondition on that would make for symmetry and wouldn't force a __parent__ field on an interface. | 12:41 |
tlotze | If someone wants such a field (and widget and all) they can always choose to add one. Other don't have to... | 12:43 |
*** faassen has joined #zope3-dev | 12:48 | |
philiKON | tlotze, so you're suggesting that IContained objects gain a __setparent__ method? | 12:59 |
tlotze | yes | 12:59 |
tlotze | One might even consider sending events there, or doing something about the name the object is being assigned. | 13:00 |
philiKON | how would get an an objects parent? | 13:01 |
*** mgedmin has joined #zope3-dev | 13:01 | |
philiKON | __getparent__ | 13:01 |
philiKON | ? | 13:01 |
tlotze | It would make for some symmetry while I don't see why one shouldn't just look at __parent__. | 13:02 |
tlotze | (I'm not suggesting taking __parent__ away...) | 13:03 |
*** flox has joined #zope3-dev | 13:03 | |
philiKON | ack | 13:04 |
philiKON | seems very unpythonic to me | 13:04 |
philiKON | not being able to set __parent__, but getting it | 13:04 |
tlotze | true | 13:04 |
tlotze | Would a property help solve this? | 13:05 |
*** Aiste has joined #zope3-dev | 13:05 | |
tlotze | Setting the precondition on the getter wouldn't force a field on the interface, just a declaration of the getter. | 13:06 |
tlotze | oh | 13:06 |
* tlotze is away for lunch for a short while | 13:06 | |
*** J1m has joined #zope3-dev | 13:31 | |
tlotze | back again | 13:40 |
*** mkerrin has joined #zope3-dev | 13:46 | |
*** dunny has quit IRC | 13:48 | |
*** romanofski has quit IRC | 13:53 | |
*** romanofski has joined #zope3-dev | 13:57 | |
*** volvox has joined #zope3-dev | 14:03 | |
*** volvox has quit IRC | 14:11 | |
*** baijum has joined #zope3-dev | 14:12 | |
*** volvox has joined #zope3-dev | 14:12 | |
*** tvw has joined #zope3-dev | 14:35 | |
*** baijum has quit IRC | 14:38 | |
*** rocky|Zzz is now known as rocky | 14:38 | |
*** J1m has quit IRC | 14:51 | |
*** volvox has quit IRC | 14:58 | |
tlotze | wuah | 15:09 |
tlotze | containment constraints lend themselves to funny things ;o) | 15:09 |
tlotze | Suppose I have a container A and a container B. the latter being an attribute of A. | 15:09 |
tlotze | Suppose further I have objects of class C which physically belong in B. | 15:10 |
tlotze | And now suppose I want the add menu on A to show an entry for adding a C object (which will be added to B, not A under the hood). | 15:11 |
tlotze | It sort of "works" if I ly to Zope about containment and put contains(<some interface implemented by C>) in an interface implemented by A. | 15:12 |
philiKON | tlotze, don't do funny things like that :) | 15:12 |
tlotze | But the add menu isn' the only one interested in containment constraints, so this is bad. | 15:12 |
philiKON | the "under the hood" statement is already a sign that you're exceeding the standard containment machinery | 15:12 |
tlotze | But what's the right way to do it? | 15:12 |
tlotze | true | 15:12 |
philiKON | i odn't know your use case | 15:13 |
tlotze | I just wonder how to clean up this code... | 15:13 |
*** alga has joined #zope3-dev | 15:13 | |
tlotze | A represents a rather complex entity which can be assigned many objects of types C, D, E... | 15:13 |
tlotze | To get some sort of order into things, we collect C objects in the B container. | 15:14 |
philiKON | what is "it"? | 15:14 |
philiKON | sorry, what is "A" | 15:14 |
philiKON | and it what terms is it "assigned"? | 15:15 |
tlotze | A is a person, C is, say, letters related to the person, D might be the person's friends, whatever | 15:16 |
philiKON | a person's friends are also persons? | 15:16 |
tlotze | Sorry for the generic "assigned"... | 15:16 |
philiKON | i mean, you don't necessaril yhave to express all this in containment constraints | 15:16 |
tlotze | Or make it email addresses. | 15:16 |
tlotze | How to affect the add menu then? | 15:17 |
philiKON | why use the add menu? | 15:17 |
philiKON | btw, the add menu is controlled via <browser:addMenuItem /> | 15:17 |
tlotze | Because we use it in other places and it is what users are used to if they want to add something. | 15:17 |
philiKON | which can point to pretty much any factory or add view | 15:17 |
tlotze | hm | 15:17 |
philiKON | if you want to use the add menu and do funky stuff, i want you rown adding (+) view | 15:18 |
tlotze | What if I use addMenuItem in contradiction to container constraints? | 15:18 |
philiKON | this adding view produces the info for the add menu | 15:18 |
* tlotze might just as well try it out before asking stupid questions... | 15:18 | |
philiKON | i'm not convinced the add menu is useful for adding stuff that isn't directly containment related | 15:19 |
philiKON | there's nothing wrong with custom menus | 15:19 |
tlotze | Ah, I didn't think of @@adding... sounds like what we want. | 15:19 |
philiKON | not @@adding | 15:19 |
philiKON | container/+/ | 15:19 |
tlotze | k | 15:19 |
philiKON | + is the adding view | 15:19 |
philiKON | IAdding | 15:19 |
philiKON | add forms are registered for IAdding | 15:19 |
philiKON | it's all in my book :) | 15:19 |
tlotze | ;o) | 15:19 |
dobee | projekt01: ayt? | 15:32 |
*** gintas has joined #zope3-dev | 15:39 | |
*** benji has joined #zope3-dev | 15:41 | |
*** niemeyer has joined #zope3-dev | 15:41 | |
*** alecm has joined #zope3-dev | 15:51 | |
*** mgedmin is now known as Finland | 15:55 | |
*** Finland is now known as mgedmin | 15:55 | |
*** batlogg has quit IRC | 16:06 | |
*** J1m has joined #zope3-dev | 16:51 | |
*** nathany has joined #zope3-dev | 17:00 | |
*** projekt01 has quit IRC | 17:06 | |
*** hdima has quit IRC | 17:11 | |
*** projekt01 has joined #zope3-dev | 17:12 | |
*** Aiste has quit IRC | 17:12 | |
*** eins has quit IRC | 17:15 | |
*** srichter has quit IRC | 17:33 | |
*** srichter has joined #zope3-dev | 17:38 | |
*** ChanServ sets mode: +o srichter | 17:39 | |
*** genconc has quit IRC | 18:11 | |
*** tvw has left #zope3-dev | 18:17 | |
*** flox has quit IRC | 18:44 | |
*** Aiste has joined #zope3-dev | 18:58 | |
*** romanofski has quit IRC | 19:20 | |
*** philiKON has quit IRC | 19:24 | |
*** projekt01 has left #zope3-dev | 19:44 | |
*** alga has quit IRC | 19:52 | |
*** mkerrin has quit IRC | 19:53 | |
*** flox has joined #zope3-dev | 19:54 | |
*** hazmat has joined #zope3-dev | 19:56 | |
*** ChanServ sets mode: +o hazmat | 19:56 | |
*** fcorrea has joined #zope3-dev | 20:02 | |
*** xenru has quit IRC | 20:02 | |
*** gumpa has joined #zope3-dev | 20:05 | |
*** faassen has quit IRC | 20:07 | |
*** bradb has quit IRC | 20:09 | |
*** bradb has joined #zope3-dev | 20:13 | |
*** gumpa has quit IRC | 20:14 | |
*** gumpa has joined #zope3-dev | 20:15 | |
*** projekt01 has joined #zope3-dev | 20:16 | |
*** tvw has joined #zope3-dev | 20:21 | |
*** tav has left #zope3-dev | 20:23 | |
*** philiKON has joined #zope3-dev | 20:26 | |
*** hazmat has quit IRC | 20:30 | |
*** hazmat has joined #zope3-dev | 20:32 | |
*** ChanServ sets mode: +o hazmat | 20:32 | |
*** mexiKON has joined #zope3-dev | 20:42 | |
*** dobee has quit IRC | 20:47 | |
*** romanofski has joined #zope3-dev | 20:47 | |
*** batlogg has joined #zope3-dev | 20:50 | |
*** philiKON has quit IRC | 20:57 | |
*** nathany has quit IRC | 21:00 | |
*** rocky is now known as rocky|away | 21:20 | |
*** rom|zZZ has quit IRC | 21:25 | |
*** tvw has left #zope3-dev | 21:31 | |
*** dunny has joined #zope3-dev | 21:33 | |
*** hazmat has quit IRC | 21:45 | |
*** batlogg has quit IRC | 21:56 | |
*** ignas has quit IRC | 22:02 | |
*** jinty_ has joined #zope3-dev | 22:02 | |
*** jinty has quit IRC | 22:02 | |
*** batlogg has joined #zope3-dev | 22:03 | |
*** Aiste has quit IRC | 22:04 | |
*** jinty_ has quit IRC | 22:21 | |
*** jinty_ has joined #zope3-dev | 22:22 | |
*** mexiKON is now known as philiKON | 22:24 | |
*** mgedmin has quit IRC | 22:32 | |
*** MiUlEr has joined #zope3-dev | 22:33 | |
*** _projekt01 has joined #zope3-dev | 22:50 | |
*** gintas has quit IRC | 22:51 | |
*** projekt01 has quit IRC | 22:54 | |
*** wrobel has quit IRC | 22:54 | |
*** batlogg has quit IRC | 22:56 | |
*** _projekt01 is now known as projekt01 | 22:59 | |
*** dobee has joined #zope3-dev | 23:01 | |
*** dobee has quit IRC | 23:04 | |
*** dobee has joined #zope3-dev | 23:06 | |
*** oferw has joined #zope3-dev | 23:06 | |
*** batlogg has joined #zope3-dev | 23:09 | |
*** hazmat has joined #zope3-dev | 23:17 | |
*** ChanServ sets mode: +o hazmat | 23:17 | |
*** dobee has quit IRC | 23:21 | |
*** MiUlEr has quit IRC | 23:21 | |
*** fcorrea has left #zope3-dev | 23:32 | |
*** MiUlEr has joined #zope3-dev | 23:39 | |
timte | is their any info on using local utilities in zope 3.3? | 23:44 |
philiKON | my book has some | 23:46 |
*** gumpa has quit IRC | 23:47 | |
*** gumpa has joined #zope3-dev | 23:48 | |
timte | philiKON: I meant available _now_ :) | 23:52 |
philiKON | timte, 1st ed is available now | 23:52 |
timte | but isn't local utilities rewritten in 3.3? | 23:52 |
philiKON | no | 23:53 |
philiKON | jus tmade simpler | 23:53 |
timte | ok, I'll read in your book then, I have it here... somewhere :) | 23:55 |
*** rocky|away is now known as rocky | 23:59 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!