*** bska|mobile has quit IRC | 00:10 | |
*** niemeyer has quit IRC | 00:10 | |
*** srichter has quit IRC | 00:22 | |
*** Arnia has joined #zope3-dev | 00:27 | |
*** bskahan has joined #zope3-dev | 00:36 | |
*** mohsen has quit IRC | 00:45 | |
Damascene | i do like the cover though | 00:46 |
---|---|---|
*** srichter has joined #zope3-dev | 01:08 | |
*** ChanServ sets mode: +o srichter | 01:09 | |
*** tvon has joined #zope3-dev | 01:23 | |
*** tvon has quit IRC | 01:29 | |
*** J1m has quit IRC | 01:29 | |
*** gintas has quit IRC | 01:45 | |
philiKON | Damascene, just for the balance of things, i do cover this in my book too ;) | 03:08 |
Damascene | philiKON: haha | 03:09 |
Damascene | philiKON: but your cover isn't as cool | 03:09 |
philiKON | that's probably true | 03:17 |
Damascene | ultimately it's what is in the inside that counts though haha ;) | 03:18 |
*** `anthony has quit IRC | 03:25 | |
*** bska|mobile has joined #zope3-dev | 03:26 | |
*** bskahan has quit IRC | 03:27 | |
*** alga has joined #zope3-dev | 03:35 | |
*** bska|mobile has quit IRC | 04:17 | |
*** `anthony has joined #zope3-dev | 04:44 | |
*** stub has joined #zope3-dev | 04:45 | |
Damascene | philiKON: re: 05content: why did you make a recipe factory with a separate __call__( ) ? why not just use a normal constructur for Recipe()? | 04:48 |
Damascene | was it for demonstration purposes? | 04:48 |
*** alga has quit IRC | 04:52 | |
*** projekt01 has quit IRC | 05:08 | |
*** hazmat has joined #zope3-dev | 05:30 | |
*** RaFromBRC is now known as RaFromBRC|afk | 05:53 | |
*** MiUlEr has joined #zope3-dev | 06:44 | |
*** hazmat has quit IRC | 07:13 | |
*** MiUlEr is now known as lord | 07:28 | |
*** lord is now known as lordPy | 07:28 | |
*** lordPy is now known as MiUlEr | 07:29 | |
*** hazmat has joined #zope3-dev | 07:49 | |
*** RaFromBRC|afk is now known as RaFromBRC | 07:52 | |
*** viyyer has joined #zope3-dev | 08:38 | |
*** zagy has joined #zope3-dev | 08:54 | |
*** hdima has joined #zope3-dev | 09:08 | |
*** gintas has joined #zope3-dev | 09:14 | |
zagy | moin | 09:27 |
philiKON | Damascene, yes | 09:32 |
*** Theuni has joined #zope3-dev | 09:40 | |
*** gintas has quit IRC | 09:43 | |
*** sashav has joined #zope3-dev | 09:49 | |
*** admp has joined #zope3-dev | 10:13 | |
*** d2m has quit IRC | 10:43 | |
*** Arnia has left #zope3-dev | 10:46 | |
*** RaFromBRC is now known as RaFromBRC|zZz | 10:53 | |
*** viyyer has quit IRC | 11:11 | |
*** viyyer has joined #zope3-dev | 11:15 | |
*** admp has joined #zope3-dev | 11:16 | |
*** admp has quit IRC | 11:20 | |
*** projekt01 has joined #zope3-dev | 11:24 | |
*** lunatik has joined #zope3-dev | 11:34 | |
*** efge has joined #zope3-dev | 12:00 | |
*** hazmat has quit IRC | 12:02 | |
*** BjornT has joined #zope3-dev | 12:23 | |
*** philiKON has quit IRC | 12:44 | |
*** philiKON has joined #zope3-dev | 12:46 | |
*** AJC has joined #zope3-dev | 13:36 | |
*** ignas has joined #zope3-dev | 13:42 | |
*** AJC has quit IRC | 13:48 | |
*** `anthony has quit IRC | 13:59 | |
*** bskahan has joined #zope3-dev | 14:10 | |
*** Arnia has joined #zope3-dev | 14:11 | |
*** faassen has joined #zope3-dev | 14:26 | |
*** Aiste has joined #zope3-dev | 14:30 | |
*** J1m has joined #zope3-dev | 14:33 | |
*** srichter has quit IRC | 14:33 | |
*** mohsen has joined #zope3-dev | 14:35 | |
*** faassen has quit IRC | 14:49 | |
*** srichter has joined #zope3-dev | 15:09 | |
*** faassen has joined #zope3-dev | 15:09 | |
*** ChanServ sets mode: +o srichter | 15:10 | |
*** viyyer has quit IRC | 15:17 | |
*** d2m has joined #zope3-dev | 15:21 | |
*** `anthony has joined #zope3-dev | 15:26 | |
*** tonico has joined #zope3-dev | 15:27 | |
*** bskahan has quit IRC | 15:48 | |
*** bskahan has joined #zope3-dev | 15:49 | |
*** andrew_m has joined #zope3-dev | 15:58 | |
*** `anthony has quit IRC | 16:07 | |
*** `anthony has joined #zope3-dev | 16:08 | |
andrew_m | hmm.. if 'num' is defined in a schema as Int, how can i write a testcase that an exception is raised when i assign e.g. a string to it? | 16:08 |
andrew_m | e.g. self.doc.num = 4 # fine | 16:08 |
andrew_m | self.doc.num = 'blub' # has to fail | 16:09 |
andrew_m | self.assertRaises(WrongType, ??, 'blub') | 16:09 |
*** niemeyer has joined #zope3-dev | 16:12 | |
J1m | andrew_m, the schema doesn't enforce anything | 16:16 |
J1m | It just declares | 16:16 |
J1m | If you want enforcement, you have to do that in the implementation. | 16:16 |
J1m | There are tools to help with that. | 16:16 |
andrew_m | ok, think i did it that way since in a python prompt an exception is raised | 16:17 |
andrew_m | WrongType: ('blub', (<type 'int'>, <type 'long'>)) | 16:17 |
*** AJC has joined #zope3-dev | 16:17 | |
J1m | Perhaps you are using one of these tools | 16:17 |
andrew_m | yep | 16:17 |
andrew_m | think my problem is more with testing | 16:17 |
andrew_m | i thought self.assertRaises(WrongType, self.doc.num.validate, 'blub') would work | 16:18 |
andrew_m | but no luck | 16:18 |
J1m | Don't use javiotic tests, | 16:18 |
J1m | Use doctests, as God intended, :) | 16:19 |
Damascene | philiKON: ah, that's pretty good then. lets you get a better feel for the factories. | 16:19 |
andrew_m | J1m: heh, alright, thanks for the hint - i'll try that | 16:19 |
AJC | I've been working with the latest code from SVN and I've implemented the traversal example from the book. I'm getting a DeprecationWarning: "Use of factory without provides to indicate a handler is deprecated." | 16:21 |
AJC | what am I not doing right? :-) | 16:21 |
J1m | You are using a factory without provides to indicate a handler. :) | 16:22 |
AJC | heh, ok. what's can I add to my factory to fix that? | 16:23 |
J1m | That's not the whole deprecation message, is it? | 16:23 |
J1m | What is the whole message? | 16:24 |
AJC | the only other thing is "Use the handler attribute instead." | 16:24 |
J1m | Uh huh. | 16:25 |
AJC | in Python24\Lib\site-packages\zope\app\component\metaconfigure.py | 16:25 |
J1m | So, I suggest you use the handler attribute instead. | 16:25 |
AJC | ok, fair game, but none of my code (copied from the book example) is using that directly, so it's all happening behind my back... | 16:26 |
J1m | Ah, dang | 16:26 |
J1m | I forget | 16:26 |
J1m | That's a problem with deprecation warnings. | 16:26 |
philiKON | andrew_m, use FieldProperty from the zope.schema package to enforce validation upon attribute setting | 16:26 |
andrew_m | philiKON: yep, i'm doing that | 16:27 |
J1m | They aren't exceptions, so you can't see where they are in the configuration process. | 16:27 |
J1m | Look at your subscriber directives. | 16:27 |
J1m | I need to figure out how to make this clearer, | 16:28 |
andrew_m | philiKON: i would like to test if it really works somehow (i.e. raises a WrongType exception when assigning 'blah' to an Int) | 16:28 |
J1m | I guess that the deprecation warning should try to give information about the specific directive. | 16:28 |
AJC | http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/Zope3Book/traversal.html | 16:28 |
philiKON | andrew_m, lemme see, i have an exmaple in my book i think | 16:28 |
andrew_m | philiKON: ohh.. just tell me the page, have it here :) | 16:29 |
andrew_m | philiKON: excellent book btw.. like the refactoring approach with showing different ways of doing things | 16:30 |
philiKON | i'm glad you like it | 16:30 |
Damascene | darn, the book is OUR for you? | 16:31 |
Damascene | i got to see if my bookstore has it. | 16:31 |
philiKON | OUR? | 16:31 |
Damascene | OUT | 16:32 |
Damascene | sorry haha | 16:32 |
andrew_m | Damascene: got my copy from amazon | 16:32 |
philiKON | Damascene, yes, it's been available in euruope for a couple of weeks now (about 4) | 16:32 |
*** Theuni has quit IRC | 16:32 | |
philiKON | u.s. release is holding up because of long shipping and u.s. customs | 16:32 |
Damascene | ... yeah all that secret informatino in there on how to construct w3ap0ns of ma$$ ... oh nevermind haha ;) | 16:33 |
philiKON | but i see now that amazon.com doesn't say anymore "not yet release". not they say "usually ships in 2 to 3 weeks", which is a good sign | 16:33 |
Damascene | andrew_m: you think the book gives you a nice foundation to grow on so you can easily expand when zopex3.1 is released? | 16:33 |
andrew_m | Damascene: yeah, think so. there are good examples that get you started even if you are a beginner with zope (like me) | 16:34 |
andrew_m | in the end i guess it's about understanding the idea behind zope 3 - and i hope that won't change much with 3.1 | 16:36 |
andrew_m | syntax can always be changed easily | 16:36 |
philiKON | a few concepts will change with x3.1, but i tried writing the book with those changes in mind (i couldn't foresee all of them, of course) | 16:38 |
andrew_m | think it's quite amazing to release such a book so short after zope 3 came out | 16:40 |
philiKON | in end, i might just write a small article "What's new in Zope X3.1" to inform people who are scared to read CHANGES.txt | 16:40 |
*** Damascus- has joined #zope3-dev | 16:40 | |
*** Damascus- has joined #zope3-dev | 16:40 | |
srichter | I think our CHANGES.txt is pretty high-level | 16:46 |
*** Damascene has quit IRC | 16:46 | |
philiKON | sure, but i think there are enough people who wouldn't mind seeing a "you used to do it this way, now you do it this way" article | 16:48 |
philiKON | like andy kuchling does it for python | 16:48 |
*** Aiste has quit IRC | 16:48 | |
*** Damascus- is now known as Damascene | 16:50 | |
srichter | cool, write it :-) | 16:51 |
philiKON | let's get x3.1 out first :) | 16:52 |
bskahan | actually, an article with examples for handling new deprecation warnings would be very helpful | 16:56 |
srichter | I am ready to release, I am just waiting for people to fix bugs :-) | 16:56 |
bskahan | :) | 16:57 |
*** AJC has quit IRC | 16:57 | |
* philiKON svn ups TODO.txt | 16:59 | |
philiKON | bskahan, yeah, good idea | 16:59 |
srichter | but an almost impossible task :-) | 17:00 |
philiKON | srichter, i propose to move the first todo item (new i18n message support) to TODOLATER.txt, as we already discussed | 17:01 |
philiKON | i want to tackle this problem | 17:01 |
philiKON | but i want to do it well | 17:01 |
philiKON | and not rush it into the x3.1 release | 17:01 |
srichter | ok | 17:02 |
* philiKON is surprised to see NoMoreSchemaBinding in todolater... are we still using schema binding? *shrug* | 17:03 | |
srichter | of course | 17:03 |
srichter | this is a lot of work | 17:03 |
philiKON | yup | 17:04 |
philiKON | maybe this can go together with the refactoring of zope.app.form | 17:04 |
srichter | I started it once, but then Jim said the proposal is outdated based on his latest ideas, so I scrapped 2-3 days of work | 17:04 |
srichter | probably | 17:04 |
philiKON | wow, we're approaching r30000 | 17:05 |
*** hdima has quit IRC | 17:05 | |
srichter | yep | 17:07 |
*** ChickenBrain has joined #zope3-dev | 17:22 | |
*** gintas has joined #zope3-dev | 17:34 | |
*** sashav has quit IRC | 17:35 | |
*** Theuni has joined #zope3-dev | 17:40 | |
*** stub has quit IRC | 17:41 | |
*** tvon has joined #zope3-dev | 18:07 | |
*** AJC has joined #zope3-dev | 18:19 | |
*** hazmat has joined #zope3-dev | 18:33 | |
*** bradb is now known as bradb|out | 18:40 | |
*** hazmat has quit IRC | 19:00 | |
*** tvon has quit IRC | 19:08 | |
*** d2m has quit IRC | 19:15 | |
*** Damascene has quit IRC | 19:18 | |
*** Damascene has joined #zope3-dev | 19:18 | |
*** Theuni has quit IRC | 19:20 | |
AJC | hmmm, it seems getView has been deprecated... shame, it was probably a bit more intuitive than getMultiAdapter. | 19:27 |
srichter | but it was also implicit | 19:27 |
srichter | I think you will get used to getMultiAdapter rather quickly | 19:27 |
srichter | also, you should not have needed getView that often anyways | 19:28 |
philiKON | i actually wante dto keep getView/queryView | 19:28 |
AJC | heh, i'm looking through your wcsite code philiKON :-) | 19:29 |
AJC | that explains why it was used here srichter! | 19:29 |
philiKON | well, wcsite is based on X3.0 | 19:30 |
philiKON | where you have to use getView | 19:30 |
AJC | how do I go about modifying the request in a publishTraverse function? I want to change the PATH_INFO to remap it to a new object... | 19:31 |
AJC | apparently the request is read only though. | 19:33 |
srichter | you cannot do this | 19:36 |
srichter | have your publishTraverse return the object you are really looking for | 19:37 |
srichter | if you really want to get to a different path use redirect in HTTP | 19:37 |
*** hazmat has joined #zope3-dev | 19:39 | |
AJC | well, I thought it would be easier to just pass a new (modified/valid) name to the ContainerTraverser, but this fails as the request no longer matches the new name... | 19:41 |
AJC | I basically want an 'archive' object that converts requests like /archive/2005/04/05/MyObject to point to MyObject | 19:42 |
AJC | since i want to use the exact same logic as in container traverser | 19:42 |
*** dafreedm has joined #zope3-dev | 19:42 | |
philiKON | if you want to use the container traverse, have 'archive' and all those pseudo objects '2005', '04', '05' provide IContainer | 19:44 |
*** tvon has joined #zope3-dev | 19:45 | |
dafreedm | Hi all, just starting with Z3: I'm trying to use a non-default InputWidget for adding/editing a Choice field. | 19:53 |
dafreedm | Namely, rather than using the default proxy function ChoiceInputWidget, I'd rather use an alternate subclass of ItemsEditWidgetBase, such as RadioWidget. | 19:53 |
dafreedm | However, when I list such a widget in the ZCML <browser:widget> subdirective, I get, as expected, an error: | 19:53 |
dafreedm | since I don't have the proxy function to split out the extra argument of the field.vocabulary for the ItemsEditWidgetBase constructor | 19:53 |
dafreedm | While I know I could do the python code to use this alternate widget, it seems like there is probably a way | 19:53 |
*** MiUlEr has quit IRC | 19:54 | |
dafreedm | (for the predefined subclasses of ItemsEditWidgetBase---and similarly for subclasses of CollectionInputWidget and ChoiceCollectionInputWidget) to do it in ZCML... | 19:54 |
dafreedm | What am I missing please? :) | 19:54 |
*** MiUlEr has joined #zope3-dev | 19:54 | |
*** d2m has joined #zope3-dev | 19:54 | |
philiKON | dafreedm, there's no way around that proxy function | 19:54 |
dafreedm | philiKON: hi... so are all the other predefined Widgets in zope.app.form.browser only good outside of ZCML? | 19:55 |
dafreedm | namely, if we write CustomWidget's ? | 19:55 |
philiKON | non | 19:59 |
philiKON | nono | 19:59 |
philiKON | it's just that certain ones are ment to operate on certain fields | 19:59 |
philiKON | so, their constructors expect certain parameters | 19:59 |
dafreedm | understand about the constructors, but then how do we use, for example, RadioWidget on a Choice schema field, through ZCML? | 20:00 |
dafreedm | Or, when we call the proxy function to break out the additional vocal field, (return zapi.getMultiAdapter((field, field.vocabulary, request), IInputWidget), how can we specify which class provides the IInputWidget listed in the getMultiAdapter? | 20:01 |
*** lunatik has left #zope3-dev | 20:01 | |
philiKON | zapi.getMultiAdapter looks up the adapter according to well-defined lookup rules | 20:01 |
philiKON | it'll look up what's registered in your site (or the global site) | 20:02 |
philiKON | it's that simple | 20:02 |
*** tvon has quit IRC | 20:02 | |
dafreedm | ah, okay. Is there a way though, through ZCML of using this RadioWidget or DropDownWidget through the proxy function? | 20:03 |
philiKON | ah, hang on | 20:04 |
dafreedm | sure | 20:05 |
philiKON | now i read myself thru the source again and understand it :) | 20:05 |
philiKON | i was under some wrong impressions | 20:05 |
philiKON | anyways: | 20:05 |
philiKON | that "proxy" function as you call it is really a dispatcher | 20:05 |
philiKON | it dispatches widget lookup to a widget that is registered for (field, vocabulary_type), so for example (IChoice, IVocabularyTOkenized) | 20:06 |
philiKON | so, what you can do is register RadioWidget as widget for your vocabulary type | 20:06 |
philiKON | that'll let the dispatch function look up RadioWidget instead of DropDownWidget | 20:07 |
dafreedm | AHA! I've been reading through the source there also throughout the morning, but still so new to Z3, just understanding bits and pieces of it. | 20:07 |
philiKON | yes; this part isn't easy | 20:07 |
AJC | philiKON, my archive already provides IFolder, and I'm reusing the ContainerTraverser code by passing it a new name (say, "Welcome" instead of "2005") but the object instanciation fails elsewhere. | 20:07 |
dafreedm | This sounds exactly like what I want... | 20:07 |
dafreedm | What ZCML directive registers that dispatch function to look up the right Widget? | 20:08 |
philiKON | dafreedm, ideally, your vocabualry is a custom one anyway, so you can just have it implement IMyCustomVocabularyThatIsSoGreat | 20:08 |
philiKON | you don't want to register a dispatch function | 20:08 |
philiKON | you want to register a new widget for the (IChoice, IMyCustomVocabularyThatISSoGreat) combination | 20:08 |
philiKON | so that the dispatchfunction (ChoiceInputWidget) looks that up instead of the default one | 20:09 |
philiKON | are you using Zope X3.0 or the trunk? | 20:09 |
dafreedm | trunk | 20:09 |
dafreedm | So, I don't use the <browser:widget> subdirective, but instead some other one to register the new widget with the IInputWidget for the multi-adapter? | 20:09 |
philiKON | ok, look at zope.app.form.browser/configure.zcml, line 343 thru 350 | 20:09 |
philiKON | do yous ee it? | 20:10 |
dafreedm | Got it!!! I register the View to provide the IInputWidget and then specify a different 'factory'... :) | 20:10 |
philiKON | yes, for factory you specify RadioWidget | 20:10 |
philiKON | and instead of IVocabularyToknized, you want to pass in the interface that your vocabulary provides | 20:11 |
dafreedm | okay, sounds good. However, what if I want to use the 'values' attribute to the 'Choice' schema field, instead of a full-on Vocab. | 20:12 |
dafreedm | Note, that I don't long term, I just like to play with things in the easiest way as I learn them to build up point by point... | 20:12 |
*** hazmat has quit IRC | 20:12 | |
dafreedm | Compartmentalizing my changes, so to speak... | 20:12 |
philiKON | afaik, using the 'values' attribute will have a vocabualry created on the fly that contains those items | 20:13 |
philiKON | in that case it'd be tough to do | 20:13 |
philiKON | you could, of course, override the default choice widget for your whole site in overrides.zcml; then don't change anything in that directive except DropdownWidge t-> RadioWidget | 20:14 |
dafreedm | I think I'll just use a Vocab, since I'd move to that before long anyway... | 20:15 |
dafreedm | I just always like to poke my nose in the boundary value cases of the config... | 20:15 |
philiKON | :) | 20:15 |
dafreedm | Well, philiKON, thanks for the insight. | 20:15 |
philiKON | np | 20:16 |
dafreedm | I have Stephan's book here to help me learn Z3, but it's a little above my head (though good). Can't wait for yours... | 20:16 |
dafreedm | I called Springer US headquarters and they tell me April 14 as initial availability. | 20:17 |
dafreedm | Oh well, they seem to be taking their time <shrug> | 20:17 |
philiKON | it's more like u.s. customs i think | 20:17 |
philiKON | dunno, could be a little slow on the springer side as well | 20:18 |
dafreedm | I'm surprised Springer just doesn't print the US run in the US. WOuld seem to make more financial sense, no? | 20:18 |
philiKON | well, the weren't that many copies printed | 20:18 |
dafreedm | ah, fair enough. | 20:18 |
*** Aiste has joined #zope3-dev | 20:19 | |
dafreedm | well, looking forward to it being out. best wishes... | 20:19 |
philiKON | thanks | 20:20 |
Damascene | yeah just looking at the example code got me all excited | 20:20 |
philiKON | dafreedm, so, how official is April 14? I didn't even know that date, springer germany just told me that it can take four to six weeks | 20:21 |
dafreedm | philiKON: honestly, I'm not sure. I spoke at length with a NYC-based customer-support rep, and he definitely said April 14 is keyed into their systems | 20:22 |
dafreedm | What he didn't say was: | 20:22 |
dafreedm | what it actually meant. I tried to pressure him to tell me if April 14 meant that I could call him up, give him a credit card number | 20:22 |
dafreedm | and then have him overnight the book to me. | 20:22 |
dafreedm | He wouldn't go that far as to say that I could have it in my hands on April 15, but he did sort of suggest that I could have it in my hands | 20:23 |
dafreedm | within a few days of April 14. | 20:23 |
dafreedm | So, in other words, I was worried that SPringer might need a few weeks to process the book through their supply chain, | 20:23 |
philiKON | ok, thanks for the info | 20:23 |
*** gintas has quit IRC | 20:23 | |
philiKON | it's just that now i have more definite information tot ell other potential readers | 20:24 |
dafreedm | and he seemed to suggest that the April 14 date took that itno account | 20:24 |
philiKON | right | 20:24 |
dafreedm | Also, I should note that as of today (I've been checking every day or every other day), Amazon.com lists the book as 'orderable' | 20:24 |
dafreedm | rather than 'not yet published' | 20:24 |
dafreedm | however, they say it need 2-3 weeks to ship, so that still works with the April 14 date... | 20:24 |
dafreedm | probably more info than you wanted... some of us are pretty anxious to get it though <grin> | 20:25 |
philiKON | dafreedm, yes, i saw that too! | 20:26 |
*** tvon has joined #zope3-dev | 20:50 | |
*** mohsen is now known as mohsen-away | 20:58 | |
*** hazmat has joined #zope3-dev | 21:04 | |
*** RaFromBRC|zZz is now known as RaFromBRC | 21:10 | |
*** Damascene has quit IRC | 21:11 | |
*** faassen has quit IRC | 21:12 | |
*** gintas has joined #zope3-dev | 21:23 | |
*** Dunebuggy has joined #zope3-dev | 21:24 | |
*** RaFromBRC has quit IRC | 21:37 | |
*** Aiste has quit IRC | 21:38 | |
*** Damascene has joined #zope3-dev | 21:41 | |
*** bskahan has quit IRC | 21:41 | |
*** bskahan has joined #zope3-dev | 21:45 | |
*** bradb|out is now known as bradb | 21:48 | |
*** AJC has quit IRC | 21:50 | |
*** dafreedm has quit IRC | 21:53 | |
*** tvon has quit IRC | 22:28 | |
*** RaFromBRC has joined #zope3-dev | 22:35 | |
*** efge has left #zope3-dev | 22:38 | |
*** RaFromBRC has quit IRC | 22:40 | |
*** RaFromBRC has joined #zope3-dev | 22:41 | |
*** gintas has quit IRC | 23:19 | |
*** ignas has quit IRC | 23:24 | |
*** srichter has quit IRC | 23:43 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!