IRC log of #zope3-dev for Wednesday, 2006-08-30

*** dobee has quit IRC00:04
*** gumpa has left #zope3-dev00:13
*** romanofski is now known as rom|zZZ00:24
*** wrobel has quit IRC00:38
*** tiredbones has quit IRC00:38
*** tiredbones has joined #zope3-dev00:38
*** bradb has joined #zope3-dev00:55
*** benji has quit IRC01:05
*** d21 has joined #zope3-dev01:23
*** d2m has quit IRC01:25
*** yota has quit IRC01:47
*** jinty has quit IRC02:07
*** torkel_ has joined #zope3-dev02:38
*** elro has joined #zope3-dev02:54
*** hazmat has quit IRC03:12
*** TresEquis has joined #zope3-dev03:15
*** hazmat has joined #zope3-dev03:19
*** ChanServ sets mode: +o hazmat03:19
*** rocky is now known as rocky|Zzz03:24
*** elro has quit IRC03:27
*** torkel_ has quit IRC03:28
*** TresEquis has quit IRC05:06
*** niemeyer has quit IRC05:46
*** robyg has joined #zope3-dev06:51
*** hazmat has quit IRC07:43
*** hazmat has joined #zope3-dev07:46
*** ChanServ sets mode: +o hazmat07:46
*** bradb has quit IRC07:50
*** robyg has quit IRC07:51
*** bradb has joined #zope3-dev07:53
*** eins has joined #zope3-dev08:07
*** dobee has joined #zope3-dev08:13
*** wrobel has joined #zope3-dev08:20
*** alecm has quit IRC08:26
*** bradb has quit IRC08:29
*** bradb has joined #zope3-dev08:32
*** Aiste has joined #zope3-dev08:47
*** bradb has quit IRC08:53
*** xenru has joined #zope3-dev08:54
*** bradb has joined #zope3-dev08:56
*** d21 has quit IRC08:59
*** hdima has joined #zope3-dev09:10
*** flox has quit IRC09:14
*** batlogg has quit IRC09:22
*** d2m has joined #zope3-dev09:28
*** philiKON has quit IRC09:37
*** Aiste has quit IRC09:38
*** projekt01 has joined #zope3-dev09:41
*** romanofski has joined #zope3-dev09:41
*** romanofski has quit IRC09:50
*** romanofski has joined #zope3-dev09:51
*** batlogg has joined #zope3-dev09:52
romanofskimorjens09:58
*** batlogg has joined #zope3-dev10:08
*** flox has joined #zope3-dev10:10
*** Aiste has joined #zope3-dev10:11
*** philiKON has joined #zope3-dev10:12
*** Aiste has quit IRC10:15
*** yota has joined #zope3-dev10:21
*** kobold has joined #zope3-dev10:36
*** xenru has quit IRC10:39
*** xenru has joined #zope3-dev10:40
*** romanofski has quit IRC10:45
*** hazmat has quit IRC10:48
*** hazmat has joined #zope3-dev10:51
*** ChanServ sets mode: +o hazmat10:51
*** romanofski has joined #zope3-dev10:54
*** timte has joined #zope3-dev11:28
*** flox has quit IRC11:29
*** hazmat has quit IRC11:31
*** ignas has joined #zope3-dev12:15
tlotzehi12:18
tlotzestill wondering about zope.app.container stuff...12:18
tlotzethis time the containment constraints12:19
tlotzeIs there any special reason why constraints on container types and types of items in a container are expressed in such different way?12:19
philiKONtlotze, what do you mean?12:20
tlotzeEspecially 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
philiKONwell, it is a constraint on the __parent__ field12:21
philiKONi think that makes sense12:21
philiKONif you want to avoid interference, put the constraint on a different interface12:21
tlotzeThe trouble is that __parent__ is a field at all.12:21
tlotzesure12:21
philiKONIRecipe has the normal fields and IRecipeCOntained has the __parent__ field12:21
tlotzebut that leads to a lot of small interfaces which exists for a purely technical reason12:21
philiKONyou're trying to express a technical thing :)12:22
tlotzehm12:22
tlotzedunno12:22
philiKONnote that the "interference" can easily be avoided, too12:22
philiKONwhen in formlib, just omit __arent__ and __name__12:22
philiKONfor example12:22
tlotzebut it feels a little awkward having to do this12:23
tlotzeI mean, you have no choice whether to exclude __parent__, for example.12:23
philiKONwhat do you mean?12:23
tlotzeThere's simply no widget for it, so formlib will bomb if you forget to exclude it.12:23
philiKONso?12:23
philiKONexlude it :)12:24
tlotzeThat's what I feel is awkward.12:24
philiKONform_fields = Fields(IRecipe).omit('__parent__', '__name__')12:24
tlotzeHaving to express things which don't give me a choice anyway.12:24
philiKONwhy not12:24
philiKONthere could be a widget for __parent__12:24
philiKONperhaps someone has that use case12:24
philiKONformlib and containment are orthogonal12:24
* tlotze tr4ies to imagine one...12:25
philiKONzope.schema.Object has a widget12:25
philiKONfor example :)12:25
tlotzephew12:25
philiKONanyways, you could of course register a null-widget12:25
philiKONfor __parent__12:25
tlotzeI mean, strictly speaking, you're right.12:25
philiKONbut that seems hardly worht the effort12:25
tlotzeIt's just that I find code littered with these containment interfaces which all look the same - not very elegant, I feel.12:26
philiKONi think it depends on the way you want to express things12:27
philiKONif you can imagine recipes that aren't contained, splitting it up is ok i think12:27
philiKONIRecipe expresses recipe data12:27
philiKONIREcipeContained expresses how recipes fit into the hierarchy in a particular app12:28
MJphiliKON: Nice solution to the virtual host prob12:28
MJphiliKON: I take it you'll need to assign the custom IVirtualHostRoot interface to the folder traversed?12:29
tlotzephiliKON, sure12:29
MJ(you didn't say in your email)12:29
philiKONMJ, yeah, forgot to say that12:29
philiKONMJ, feel free to reply12:29
tlotzeIt's just so wordy...12:29
* MJ closed the browser already..12:29
MJSorry, I am about to leave, so I can't.12:30
philiKONtlotze, true. what are you suggesting though?12:30
philiKONi mean, the inteference in formlib, etc. can be dealt with by either explicitly omitting the fields12:31
philiKONor by writing helpers that do that12:31
philiKONso you don't have to do it all the time12:31
philiKONother than that i'd be happyt o listen to suggestions ;)12:31
tlotzeI'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
philiKONAttribute has no way of specifying constraints12:32
philiKONwe want to express a constraint12:32
philiKONthat's what schemas are there for12:32
philiKONschema fields that is12:32
philiKONexpressing constraints12:32
philiKONthe fact that you can make forms out of them is just *one* application of schemas12:32
philiKONas you see, containment constraints is another one12:32
tlotzeIt's admittedly an elegant and clean design.12:33
philiKONi think so too12:33
tlotzeIt just ends up yielding wordy code in simple use cases.12:33
philiKONi sort of agree12:33
einsdid any body succeed to use different sqlalchemy engines for different instances of objects of the same class? is it possible at all?12:33
tlotzephiliKON, 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
philiKONwhich field would you use?12:36
philiKONcontainers don't store their contained objects in attributes12:36
philiKONthey use __setitem__12:36
philiKONso we have a precondition for __setitem__12:36
philiKONthe precondition says: only foo bojects allowed12:36
tlotzetechnically it's clear12:36
tlotzehm12:37
tlotzeright12:37
tlotzeJust caught myself in time before over-generalizing thing12:37
tlotzes12:37
tlotze;o12:37
tlotze)12:37
tlotzenarf12:37
*** jinty has joined #zope3-dev12:37
*** kobold has quit IRC12:38
philiKONtlotze, ;)12:38
philiKONtlotze, btw, the precondition system allows you to write very flexible preconditions12:39
philiKONsuch as: this container only takes persistent objects12:39
tlotzesure12:39
philiKON(of course, that could still be expressed with the interface-based one, using IPersistent)12:40
philiKONjust giving an example12:40
tlotzeanother 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
tlotzeIf 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-dev12:48
philiKONtlotze, so you're suggesting that IContained objects gain a __setparent__ method?12:59
tlotzeyes12:59
tlotzeOne might even consider sending events there, or doing something about the name the object is being assigned.13:00
philiKONhow would get an an objects parent?13:01
*** mgedmin has joined #zope3-dev13:01
philiKON__getparent__13:01
philiKON?13:01
tlotzeIt 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-dev13:03
philiKONack13:04
philiKONseems very unpythonic to me13:04
philiKONnot being able to set __parent__, but getting it13:04
tlotzetrue13:04
tlotzeWould a property help solve this?13:05
*** Aiste has joined #zope3-dev13:05
tlotzeSetting the precondition on the getter wouldn't force a field on the interface, just a declaration of the getter.13:06
tlotzeoh13:06
* tlotze is away for lunch for a short while13:06
*** J1m has joined #zope3-dev13:31
tlotzeback again13:40
*** mkerrin has joined #zope3-dev13:46
*** dunny has quit IRC13:48
*** romanofski has quit IRC13:53
*** romanofski has joined #zope3-dev13:57
*** volvox has joined #zope3-dev14:03
*** volvox has quit IRC14:11
*** baijum has joined #zope3-dev14:12
*** volvox has joined #zope3-dev14:12
*** tvw has joined #zope3-dev14:35
*** baijum has quit IRC14:38
*** rocky|Zzz is now known as rocky14:38
*** J1m has quit IRC14:51
*** volvox has quit IRC14:58
tlotzewuah15:09
tlotzecontainment constraints lend themselves to funny things ;o)15:09
tlotzeSuppose I have a container A and a container B. the latter being an attribute of A.15:09
tlotzeSuppose further I have objects of class C which physically belong in B.15:10
tlotzeAnd 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
tlotzeIt 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
philiKONtlotze, don't do funny things like that :)15:12
tlotzeBut the add menu isn' the only one interested in containment constraints, so this is bad.15:12
philiKONthe "under the hood" statement is already a sign that you're exceeding the standard containment machinery15:12
tlotzeBut what's the right way to do it?15:12
tlotzetrue15:12
philiKONi odn't know your use case15:13
tlotzeI just wonder how to clean up this code...15:13
*** alga has joined #zope3-dev15:13
tlotzeA represents a rather complex entity which can be assigned many objects of types C, D, E...15:13
tlotzeTo get some sort of order into things, we collect C objects in the B container.15:14
philiKONwhat is "it"?15:14
philiKONsorry, what is "A"15:14
philiKONand it what terms is it "assigned"?15:15
tlotzeA is a person, C is, say, letters related to the person, D might be the person's friends, whatever15:16
philiKONa person's friends are also persons?15:16
tlotzeSorry for the generic "assigned"...15:16
philiKONi mean, you don't necessaril yhave to express all this in containment constraints15:16
tlotzeOr make it email addresses.15:16
tlotzeHow to affect the add menu then?15:17
philiKONwhy use the add menu?15:17
philiKONbtw, the add menu is controlled via <browser:addMenuItem />15:17
tlotzeBecause we use it in other places and it is what users are used to if they want to add something.15:17
philiKONwhich can point to pretty much any factory or add view15:17
tlotzehm15:17
philiKONif you want to use the add menu and do funky stuff, i want you rown adding (+) view15:18
tlotzeWhat if I use addMenuItem in contradiction to container constraints?15:18
philiKONthis adding view produces the info for the add menu15:18
* tlotze might just as well try it out before asking stupid questions...15:18
philiKONi'm not convinced the add menu is useful for adding stuff that isn't directly containment related15:19
philiKONthere's nothing wrong with custom menus15:19
tlotzeAh, I didn't think of @@adding... sounds like what we want.15:19
philiKONnot @@adding15:19
philiKONcontainer/+/15:19
tlotzek15:19
philiKON+ is the adding view15:19
philiKONIAdding15:19
philiKONadd forms are registered for IAdding15:19
philiKONit's all in my book :)15:19
tlotze;o)15:19
dobeeprojekt01: ayt?15:32
*** gintas has joined #zope3-dev15:39
*** benji has joined #zope3-dev15:41
*** niemeyer has joined #zope3-dev15:41
*** alecm has joined #zope3-dev15:51
*** mgedmin is now known as Finland15:55
*** Finland is now known as mgedmin15:55
*** batlogg has quit IRC16:06
*** J1m has joined #zope3-dev16:51
*** nathany has joined #zope3-dev17:00
*** projekt01 has quit IRC17:06
*** hdima has quit IRC17:11
*** projekt01 has joined #zope3-dev17:12
*** Aiste has quit IRC17:12
*** eins has quit IRC17:15
*** srichter has quit IRC17:33
*** srichter has joined #zope3-dev17:38
*** ChanServ sets mode: +o srichter17:39
*** genconc has quit IRC18:11
*** tvw has left #zope3-dev18:17
*** flox has quit IRC18:44
*** Aiste has joined #zope3-dev18:58
*** romanofski has quit IRC19:20
*** philiKON has quit IRC19:24
*** projekt01 has left #zope3-dev19:44
*** alga has quit IRC19:52
*** mkerrin has quit IRC19:53
*** flox has joined #zope3-dev19:54
*** hazmat has joined #zope3-dev19:56
*** ChanServ sets mode: +o hazmat19:56
*** fcorrea has joined #zope3-dev20:02
*** xenru has quit IRC20:02
*** gumpa has joined #zope3-dev20:05
*** faassen has quit IRC20:07
*** bradb has quit IRC20:09
*** bradb has joined #zope3-dev20:13
*** gumpa has quit IRC20:14
*** gumpa has joined #zope3-dev20:15
*** projekt01 has joined #zope3-dev20:16
*** tvw has joined #zope3-dev20:21
*** tav has left #zope3-dev20:23
*** philiKON has joined #zope3-dev20:26
*** hazmat has quit IRC20:30
*** hazmat has joined #zope3-dev20:32
*** ChanServ sets mode: +o hazmat20:32
*** mexiKON has joined #zope3-dev20:42
*** dobee has quit IRC20:47
*** romanofski has joined #zope3-dev20:47
*** batlogg has joined #zope3-dev20:50
*** philiKON has quit IRC20:57
*** nathany has quit IRC21:00
*** rocky is now known as rocky|away21:20
*** rom|zZZ has quit IRC21:25
*** tvw has left #zope3-dev21:31
*** dunny has joined #zope3-dev21:33
*** hazmat has quit IRC21:45
*** batlogg has quit IRC21:56
*** ignas has quit IRC22:02
*** jinty_ has joined #zope3-dev22:02
*** jinty has quit IRC22:02
*** batlogg has joined #zope3-dev22:03
*** Aiste has quit IRC22:04
*** jinty_ has quit IRC22:21
*** jinty_ has joined #zope3-dev22:22
*** mexiKON is now known as philiKON22:24
*** mgedmin has quit IRC22:32
*** MiUlEr has joined #zope3-dev22:33
*** _projekt01 has joined #zope3-dev22:50
*** gintas has quit IRC22:51
*** projekt01 has quit IRC22:54
*** wrobel has quit IRC22:54
*** batlogg has quit IRC22:56
*** _projekt01 is now known as projekt0122:59
*** dobee has joined #zope3-dev23:01
*** dobee has quit IRC23:04
*** dobee has joined #zope3-dev23:06
*** oferw has joined #zope3-dev23:06
*** batlogg has joined #zope3-dev23:09
*** hazmat has joined #zope3-dev23:17
*** ChanServ sets mode: +o hazmat23:17
*** dobee has quit IRC23:21
*** MiUlEr has quit IRC23:21
*** fcorrea has left #zope3-dev23:32
*** MiUlEr has joined #zope3-dev23:39
timteis their any info on using local utilities in zope 3.3?23:44
philiKONmy book has some23:46
*** gumpa has quit IRC23:47
*** gumpa has joined #zope3-dev23:48
timtephiliKON: I meant available _now_  :)23:52
philiKONtimte, 1st ed is available now23:52
timtebut isn't local utilities rewritten in 3.3?23:52
philiKONno23:53
philiKONjus tmade simpler23:53
timteok, I'll read in your book then, I have it here... somewhere  :)23:55
*** rocky|away is now known as rocky23:59

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