IRC log of #zope3-dev for Monday, 2008-09-15

*** aclark|away is now known as aclark00:00
*** regebro has quit IRC00:01
*** mcdonc has quit IRC00:21
*** thekryz has quit IRC00:22
*** reco has joined #zope3-dev00:23
*** quodt has quit IRC00:26
*** flox has joined #zope3-dev00:30
*** aaronv has joined #zope3-dev00:33
*** mcdonc has joined #zope3-dev00:43
*** flox has quit IRC00:46
*** reco has quit IRC00:51
*** reco has joined #zope3-dev00:51
*** zagy has quit IRC00:54
*** zagy has joined #zope3-dev00:56
*** thekryz has joined #zope3-dev00:57
*** reco_ has joined #zope3-dev00:57
*** reco_ has joined #zope3-dev00:58
*** reco has quit IRC00:58
*** aclark is now known as aclark|dinner01:02
*** yota has quit IRC01:03
*** norro has quit IRC01:08
*** redir has quit IRC01:09
*** zagy has quit IRC01:09
*** srichter has joined #zope3-dev01:11
*** zagy has joined #zope3-dev01:16
*** timte has quit IRC01:22
*** zagy has quit IRC01:29
*** aaronv has quit IRC01:30
*** sunew has quit IRC01:32
*** zagy has joined #zope3-dev01:36
*** greenman has joined #zope3-dev01:36
*** tarek has joined #zope3-dev02:17
*** aclark|dinner is now known as aclark02:20
*** reco_ has quit IRC02:25
*** reco has joined #zope3-dev02:25
*** pcardune has quit IRC02:42
*** thekryz has quit IRC02:45
*** Jell-O-Fishi has quit IRC02:53
*** reco_ has joined #zope3-dev02:55
*** tarek has quit IRC02:56
*** pcardune has joined #zope3-dev03:00
*** projekt01 has joined #zope3-dev03:04
*** redir has joined #zope3-dev03:07
*** reco has quit IRC03:11
*** aclark is now known as aclark|away03:30
*** quodt has joined #zope3-dev03:39
*** Jell-O-Fishi has joined #zope3-dev03:45
*** hexsprite_ has quit IRC03:53
*** thekryz has joined #zope3-dev03:57
*** aaronv has joined #zope3-dev03:57
*** redir has quit IRC04:07
*** quodt has quit IRC04:07
*** reco_ has quit IRC04:11
*** malthe|a_ is now known as malthe04:42
*** alga has quit IRC04:44
*** aaronv has quit IRC04:50
*** malthe has quit IRC05:00
*** projekt01 has left #zope3-dev05:12
*** thekryz has quit IRC05:12
*** fairwinds has quit IRC05:48
*** hexsprite has joined #zope3-dev06:07
*** pcardune has quit IRC06:12
*** pcardune has joined #zope3-dev06:26
*** jfkw has quit IRC06:26
*** binseer has joined #zope3-dev06:53
*** b52lap has quit IRC06:59
*** pcardune has quit IRC07:02
*** greenman has quit IRC07:18
*** dobee has joined #zope3-dev07:28
*** jayaraj has joined #zope3-dev07:31
*** kursor has joined #zope3-dev07:34
*** quodt has joined #zope3-dev07:49
*** povbot has joined #zope3-dev08:28
*** redir has joined #zope3-dev08:38
*** afd__ has joined #zope3-dev08:50
*** pcardune has joined #zope3-dev08:54
*** zagy has quit IRC09:08
*** __mac__ has joined #zope3-dev09:12
*** ccomb has joined #zope3-dev09:27
*** zagy has joined #zope3-dev09:38
*** romanofski has joined #zope3-dev09:42
*** __mac__ has quit IRC09:44
*** ccomb has quit IRC09:44
*** __mac__ has joined #zope3-dev09:45
*** basti_ has joined #zope3-dev09:55
*** basti_ has quit IRC09:57
*** basti_ has joined #zope3-dev09:57
*** philiKON_ has joined #zope3-dev09:59
*** flox has joined #zope3-dev10:03
*** nyo has joined #zope3-dev10:04
*** seletz has joined #zope3-dev10:04
*** philiKON has quit IRC10:07
*** redir has quit IRC10:13
*** pelle_ has joined #zope3-dev10:15
*** goschtl has joined #zope3-dev10:23
*** philiKON_ has quit IRC10:31
*** MJ has joined #zope3-dev10:40
*** mgedmin has joined #zope3-dev10:50
*** philiKON has joined #zope3-dev10:55
*** ccomb_ has joined #zope3-dev11:05
*** pcardune has quit IRC11:12
*** thruflo has joined #zope3-dev11:12
*** yvl has joined #zope3-dev11:28
*** flox1 has joined #zope3-dev11:43
*** flox has quit IRC11:44
*** peaquino has joined #zope3-dev11:50
peaquinohello!11:51
peaquinois there a recommended way to make a widget source request dependent?11:52
peaquinoI would like to have a Choice field, with different values choosed for different users11:53
*** timte has joined #zope3-dev11:57
nyoIIRC, IVocabularyFactory thing has the "context" argument11:58
*** aclark|away is now known as aclark11:58
nyopeaquino: there's also some context binder mechanism for ISource11:59
nyopeaquino: ah, you need to make it _request_-dependent..12:00
peaquinonyo: yup :)12:00
nyopeaquino: i think it's not very good to work with request data in the data model itself, but you can always get the request object from the current security interaction12:02
nyopeaquino: but I think it's better to do that in the widget itself12:02
*** jhauser has joined #zope3-dev12:03
nyopeaquino: if you are using z3c.form's sequence widgets, you can just provide custom ITerms adapter12:05
*** yotaff has joined #zope3-dev12:07
__mac__peaquino: there is a branch of z3c.form which has support for sources12:07
peaquinonyo: right now I'm using grok and formlib12:12
__mac__peaquino: then you can have a look at zc.sourcefactory12:12
__mac__it has already the ITerms adapter12:12
__mac__for the sources12:12
peaquinonyo: yup, I'm already using zc.sourcefactory12:13
peaquinook, thanks!12:13
peaquinoI'll lok into that12:13
peaquinolook12:13
*** regebro has joined #zope3-dev12:17
*** alga has joined #zope3-dev12:27
*** tarek has joined #zope3-dev12:35
*** junkafarian_ is now known as junkafarian13:08
*** b52laptop has joined #zope3-dev13:08
*** aaronv has joined #zope3-dev13:12
*** tarek has quit IRC13:16
*** projekt01 has joined #zope3-dev13:19
*** fairwinds has joined #zope3-dev13:52
*** jhb has joined #zope3-dev13:59
*** MJ is now known as MJ|lunch14:01
*** tarek has joined #zope3-dev14:15
*** djohnson has joined #zope3-dev14:15
*** aaronv has quit IRC14:20
*** kursor has quit IRC14:22
*** kursor has joined #zope3-dev14:25
*** kursor has quit IRC14:25
*** kursor has joined #zope3-dev14:27
*** nyo has quit IRC14:46
*** redir has joined #zope3-dev14:47
*** nyo has joined #zope3-dev14:49
*** agroszer has joined #zope3-dev14:51
*** djohnson has quit IRC15:08
*** b52lap has joined #zope3-dev15:11
*** benji has joined #zope3-dev15:15
*** b52laptop has quit IRC15:17
*** jsadjohnson has joined #zope3-dev15:18
*** natea_ has joined #zope3-dev15:18
*** natea_ has quit IRC15:24
*** __mac___ has joined #zope3-dev15:25
*** basti_ has quit IRC15:25
*** __mac____ has joined #zope3-dev15:25
*** basti_ has joined #zope3-dev15:25
*** woodro has joined #zope3-dev15:27
*** pyqwer has joined #zope3-dev15:30
*** redir has quit IRC15:32
*** ignas has joined #zope3-dev15:33
*** MJ|lunch is now known as MJ15:34
*** natea_ has joined #zope3-dev15:38
*** natea_ has quit IRC15:39
*** thruflo has quit IRC15:42
*** __mac___ has quit IRC15:42
*** __mac__ has quit IRC15:42
*** pelle_ has quit IRC15:42
*** binseer has quit IRC15:45
*** __mac____ has quit IRC15:46
*** SteveA has quit IRC15:46
*** bigkevmcd has joined #zope3-dev15:47
*** jhb has quit IRC15:48
*** __mac____ has joined #zope3-dev15:50
*** SteveA has joined #zope3-dev15:50
*** malthe has joined #zope3-dev15:55
*** lurkymclurkleton has joined #zope3-dev15:57
*** aaronv has joined #zope3-dev16:00
*** jamur2 has joined #zope3-dev16:01
*** jamur2 has joined #zope3-dev16:02
*** jamur2 has quit IRC16:05
*** jamur2 has joined #zope3-dev16:05
*** natea_ has joined #zope3-dev16:06
*** elro has joined #zope3-dev16:08
*** redir_ has joined #zope3-dev16:08
*** J1m has joined #zope3-dev16:10
*** natea_ has quit IRC16:13
*** natea_ has joined #zope3-dev16:13
*** jukart_ has joined #zope3-dev16:14
*** srichter has quit IRC16:18
pyqwerprojekt01: Hi, are you online? I think I found some kind of but in z3c.form...16:30
pyqwers/but/bug16:30
projekt01pyqwer, yes16:30
pyqwerprojekt01: Ah, great - well, issue is that I construct my fields from two seperate interfaces. Both interfaces have invariants.16:31
*** jukart has quit IRC16:31
projekt01oh my, what a use case16:31
pyqwerAnd during validation, a validator is queried, for which one arbitrary schema is selected.16:31
projekt01yes16:32
projekt01why not use one interfaces inherited from both interfaces?16:32
pyqwerAnd then the validate()method somehow arbitrarily selects one of these interfaces for its getMultiAdapter() directive.16:33
pyqwerAnd if I'm out of luck, it chooses the "wrong" interface with a validator which does not make sense for my form.16:33
projekt01do both interface define the same fields?16:33
projekt01or at least are some fields defined in both interfaces?16:34
pyqwerprojekt01: No. I have a basic interface for my form (a search form in my case) and mix-in some specific search field from another interface.16:34
projekt01do you need to adapt the context within the intefaces? or are you using ignoreContext=True?16:35
pyqwerprojekt01: No, the search-form is context-less.16:35
pyqwerYes, so, ignoreContext=True.16:36
pyqwerBut I don't think this makes a difference.16:36
projekt01Ok, that's simpler16:36
projekt01What is your problem right now?16:36
pyqwerYou see the problem in field.py, line 193.16:36
projekt01what do you mean by choose the wrong interface?16:36
pyqwerWell, the validate() method calls an invariant that it should never call. It's an invariant which is defined in another interface, from where I draw one schema field into my form, but don't want to use the invariant.16:38
pyqwerAnd as the invariant checks some other fields, which are irrelevant and non-existent in my search form, an error occurs.16:38
projekt01invariants are schema specific and not field specific16:39
pyqwerYes.16:39
projekt01I guess you can't use the invariant pattern and use only one field for mixin into another interface16:39
*** reco has joined #zope3-dev16:39
pyqwerHmmm.16:40
projekt01I think you should write a own interface and not inherit from others16:40
projekt01That's why I asked about ignoreContext16:41
projekt01you don't need to provide an adapter for that search interface16:41
*** fcorrea has joined #zope3-dev16:42
pyqwerThat would be a possibility.16:42
projekt01I implement often a custom interface located in a view if I need one for a context less form. It's often not usefull to inherit from interfaces which describe a component.16:42
pyqwerAnother one could possibly be to do something like that: fields+= field.Fields(MixinInterface, interface='SearchInterface').select('name1')16:43
projekt01Search interfaces are often not the same as the component interfaces, this is also true for invariants16:43
pyqwerYes, that's right.16:43
projekt01Is this not only needed if the second interfcace is used for adaption?16:44
*** srichter has joined #zope3-dev16:44
pyqwerprojekt01: If I understood it right, one can set the interface for a field.16:44
projekt01this is a pattern for inject another interface for adaption if the used interface doesn't provide an adapter, right?16:44
*** dunny has quit IRC16:45
pyqwerprojekt01: I'm not really sure about it.16:45
pyqwer(And does not work as I hoped...)16:45
projekt01sometimes if you use an interface, the interface itself is not adaptable, then you need to define another interface which the context can adapt to16:45
*** malthe has quit IRC16:46
pyqwerprojekt01: Ok, I see. Hmmm, but that *could* solve my problem, as the lookup for the validator would be correct, then.16:47
projekt01probably ;-)16:47
projekt01it depends on which interface get used for validation.16:48
projekt01I think the adaption interface is only used for adaption, and the field defining interface get used for bind fields etc. but I'm not sure about that16:49
projekt01This could mean that still the wrong interfce get used, which is correct because the adaption interface is only responsible for return an adapter for the context16:49
projekt01it should get ingnored for everything else16:50
projekt01does this make sense?16:50
*** ChanServ sets mode: +o srichter16:51
pyqwerYes, I fear that does make sense, therefore the interface attribute is useless in my case.16:52
pyqwerIn validation it reads: "for field in fields: schema = field.interface".16:53
pyqwerAnd it seems that field.interface alway points to the original interface, where the schema is from.16:53
projekt01yes, that's correct16:54
projekt01you need an interface which describes what you need, e.g. no bad invariants16:54
*** fairwinds_ has joined #zope3-dev16:55
pyqwerBut that means, that one should always create a form-specific interface.16:55
pyqwerOr one should not use the invariant pattern.16:55
projekt01only if you like to define something different then in your component interfaces16:56
*** bigkevmcd has quit IRC16:56
projekt01and I guess that is the case with the invariants in one of your interfaces16:56
*** bigkevmcd has joined #zope3-dev16:56
pyqwerYes.16:56
projekt01;-)16:56
pyqwerHmmm, but then the whole idea of creating fields via select(), concatenating fields etc. seems to be not a good idea.16:57
projekt01you can define a mixin interface wich only defines the invariant and implememtn them directly in your component16:57
projekt01this will make your real interface stay clean of invariants16:58
projekt01and you can use it in the search form16:58
pyqwerprojekt01: I have to think about that, maybe that's an option.16:59
projekt01the problem is not related to the form framework the problem is that you use a invariant and z3c.form handles them correct. It whould be very bad if this didn't work17:00
projekt01invariant is a concept for ensure a overall check. You can partialy use such interfaces or you will break the concept17:01
pyqwerHmmm, the current design seems to gather all interfaces and execute all their invariants.17:01
projekt01yes, an invariant is allways responsible to ensure an overall validation17:01
projekt01that's all what an invariant does, nothing more or less17:02
pyqwerOk, I understand.17:02
projekt01I recommend to define plain invariant interfaces if possible17:03
pyqwerI'll probably create a custom interface for my search form, I think that's the cleanest solution.17:03
*** fairwinds has quit IRC17:03
projekt01I'm not sure if this can be done without to define the fields again in such invariant intrefaces17:03
*** rcrafton has joined #zope3-dev17:03
pyqwerWhat do you mean with "plain invariant interfaces"?17:04
projekt01just implement an interface defining the invariants17:04
pyqwerAh, ok, and use that as a mixin.17:04
projekt01or you can definen a invariant ware interface and inherit from an none invariant interface which defines the fields17:05
pyqwerYes.17:05
projekt01I often define an interface which defines some useable data e.g. metadata and use that a base for different other interfaces17:05
projekt01a/as a17:06
pyqwerYes, that's similar to what I do. But it seems I need one more meta-level.17:06
pyqwerprojekt01: Well, many thanks for that insight, you persuaded me that my issue is not a z3c.form shortcoming/bug but a misunderstanding of the invariant-concept.17:10
*** nyo has quit IRC17:14
*** srichter has quit IRC17:19
*** srichter has joined #zope3-dev17:19
projekt01the z3c.pt intergaration in z3c.form is a real pain in the ass, this work has to be done in a branch!!!17:29
projekt01the lxml dependency is very bad, we should move all that to another package then z3c.form, z3c.marco or any other package which doesn't require lxml17:31
*** yvl has quit IRC17:40
*** MJ has quit IRC17:43
*** srichter has quit IRC17:44
*** basti_ has quit IRC17:46
*** sunew has joined #zope3-dev17:47
*** srichter has joined #zope3-dev17:50
*** rmarianski has joined #zope3-dev17:50
*** pcardune has joined #zope3-dev17:52
*** sunew has quit IRC17:53
*** kursor has quit IRC17:58
*** nathany has joined #zope3-dev18:02
*** goschtl has quit IRC18:10
*** bigkevmcd has quit IRC18:15
*** bigkevmcd has joined #zope3-dev18:15
*** harobed has joined #zope3-dev18:19
*** nathany_ has joined #zope3-dev18:23
*** agroszer has quit IRC18:24
*** natea_ has joined #zope3-dev18:25
*** jukart_ has quit IRC18:26
*** projekt01 has quit IRC18:27
*** __mac__ has joined #zope3-dev18:29
*** agroszer has joined #zope3-dev18:29
*** whit has joined #zope3-dev18:30
*** afd__ has quit IRC18:32
*** natea_ has quit IRC18:33
*** natea_ has joined #zope3-dev18:34
*** afd__ has joined #zope3-dev18:35
*** natea_ is now known as natea|nyc18:36
*** jpcw2002 has joined #zope3-dev18:40
*** philiKON has quit IRC18:42
*** pcardune has quit IRC18:43
*** nathany has quit IRC18:43
*** __mac____ has quit IRC18:45
*** seletz_ has joined #zope3-dev18:51
*** malthe has joined #zope3-dev18:51
*** __mac__ has quit IRC18:53
*** nathany_ is now known as nathany19:04
*** seletz has quit IRC19:08
*** Jell-O-Fishi has quit IRC19:22
*** harobed has quit IRC19:30
*** junkafarian_ has joined #zope3-dev19:32
*** tarek has quit IRC19:34
*** agroszer_ has joined #zope3-dev19:37
*** junkafarian has quit IRC19:40
*** faassen has joined #zope3-dev19:43
*** norro has joined #zope3-dev19:47
*** philiKON has joined #zope3-dev19:53
*** seletz_ has quit IRC19:55
*** agroszer has quit IRC19:56
*** redir_ is now known as redir19:58
*** natea|nyc has quit IRC20:01
*** fairwinds_ has quit IRC20:06
*** fairwinds has joined #zope3-dev20:13
*** faassen has quit IRC20:17
*** quodt has quit IRC20:19
*** dobee has quit IRC20:20
*** philiKON has quit IRC20:27
*** sunew has joined #zope3-dev20:33
*** junkafarian_ is now known as junkafarian20:33
*** natea_ has joined #zope3-dev20:37
*** natea_ has quit IRC20:38
*** natea_ has joined #zope3-dev20:38
*** natea_ is now known as nate|boltbus20:42
*** mgedmin has quit IRC20:44
*** junkafarian has quit IRC20:45
*** junkafarian has joined #zope3-dev20:46
*** philiKON has joined #zope3-dev20:48
*** philiKON_ has joined #zope3-dev20:53
*** fcorrea has quit IRC20:54
*** fcorrea has joined #zope3-dev20:56
*** dobee has joined #zope3-dev20:56
*** seletz has joined #zope3-dev20:56
*** quodt has joined #zope3-dev20:57
*** RaFromBRC_ has joined #zope3-dev21:04
*** philiKON__ has joined #zope3-dev21:04
*** philiKON___ has joined #zope3-dev21:07
*** yota has joined #zope3-dev21:09
*** peaquino has quit IRC21:10
*** ignas has quit IRC21:12
*** philiKON_ has quit IRC21:12
*** philiKON_ has joined #zope3-dev21:12
*** nyo has joined #zope3-dev21:14
*** philiKON has quit IRC21:14
*** philiKON has joined #zope3-dev21:16
*** philiKON_ has quit IRC21:16
*** quodt has quit IRC21:17
*** RaFromBRC_ has quit IRC21:18
*** agroszer_ is now known as agroszer21:18
*** nate|boltbus is now known as natea|boltbus21:20
*** philiKON__ has quit IRC21:23
*** philiKON_ has joined #zope3-dev21:24
*** natea_ has joined #zope3-dev21:24
*** philiKON_ has joined #zope3-dev21:25
*** philiKON_ has quit IRC21:28
*** jsadjohnson has left #zope3-dev21:29
*** philiKON_ has joined #zope3-dev21:29
*** natea_ has quit IRC21:30
*** philiKON___ has quit IRC21:31
*** nyo1 has joined #zope3-dev21:32
*** nyo1 has quit IRC21:35
*** philiKON has quit IRC21:39
*** quodt has joined #zope3-dev21:42
*** lisppaste6 has quit IRC21:44
*** lisppaste6 has joined #zope3-dev21:44
*** nyo has quit IRC21:49
*** nyo has joined #zope3-dev21:54
*** seletz_ has joined #zope3-dev22:02
maltheJ1m: so right now, a lot of z3c.*-packages depend on ``zope.pagetemplate.interfaces.IPageTemplate`` where actually they want to ask for ISomethingWeCanRender. Where could we put such an interface? Ideally it should have only minimal dependencies.22:10
*** seletz has quit IRC22:10
*** aaronv has quit IRC22:16
*** sunew_ has joined #zope3-dev22:17
*** aaronv has joined #zope3-dev22:18
*** sunew_ has quit IRC22:19
*** natea|boltbus has quit IRC22:21
*** nyo1 has joined #zope3-dev22:21
*** nyo has quit IRC22:23
*** sunew has quit IRC22:25
*** seletz_ is now known as seletz22:30
*** dbfrombrc has joined #zope3-dev22:35
J1mmalthe, That's an interesting question.  I wish I had time to think about it. :)22:37
J1mI suggest bringing this up on zope-dev.22:38
maltheok22:38
andresI have an app which is instantiated multiple times inside a single zodb (with different data sources, and so on). At Startup I have to do some configuring. Is there a more elegant way than subscribing to IBeforeTraverse for every application and unsubscribing in the event handler?22:40
*** elro has quit IRC22:45
*** nyo1 has quit IRC22:46
*** woodro has quit IRC22:47
*** woodro has joined #zope3-dev22:47
*** natea_ has joined #zope3-dev22:51
*** afd__ has quit IRC22:57
*** harobed has joined #zope3-dev22:58
*** sm has joined #zope3-dev23:00
*** dunny has joined #zope3-dev23:01
*** natea_ has quit IRC23:11
*** natea_ has joined #zope3-dev23:11
*** rcrafton has quit IRC23:15
*** rcrafton has joined #zope3-dev23:16
*** pcardune has joined #zope3-dev23:20
*** whit has quit IRC23:34
*** sm has quit IRC23:39
*** woodro has quit IRC23:41
*** woodro has joined #zope3-dev23:41
*** malthe has quit IRC23:43
*** aaronv has quit IRC23:45
*** woodro has quit IRC23:45
*** malthe has joined #zope3-dev23:45
*** woodro has joined #zope3-dev23:45
*** woodro has quit IRC23:47
*** woodro has joined #zope3-dev23:49
*** woodro has quit IRC23:52
*** oggers has joined #zope3-dev23:53

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