IRC log of #schooltool for Wednesday, 2010-08-04

*** replaceafill has quit IRC01:18
*** replaceafill has joined #schooltool01:30
*** replaceafill has quit IRC01:31
*** menesis has quit IRC03:14
*** replaceafill has joined #schooltool05:49
*** replaceafill has quit IRC07:17
*** replaceafill has joined #schooltool07:27
*** replaceafill has quit IRC07:29
*** menesis has joined #schooltool09:22
*** yvl has joined #schooltool10:06
*** dadeng has joined #schooltool12:15
*** dadeng has quit IRC12:19
*** dadeng has joined #schooltool12:21
*** dadeng has quit IRC12:58
*** dadeng has joined #schooltool13:00
*** dadeng has quit IRC13:38
*** dadeng has joined #schooltool13:41
*** replaceafill has joined #schooltool13:49
replaceafillyvl, you around?13:49
yvlyes :)13:54
yvlhi :)13:54
replaceafillhey yvl13:54
replaceafillhave a few minutes (like 10)? :)13:55
yvlsure!13:55
replaceafillwhich will become like 50 :P13:55
replaceafillwell13:55
replaceafilli'm wondering13:55
replaceafilli have a messed edit form13:56
replaceafillwhich uses a subform :/13:56
replaceafilli get a validation error in the subform13:56
replaceafillbut i dont know how to handle it in the edit form13:56
* replaceafill confuses himself explaining it...13:56
yvldon't worry - z3c.form 1.2.x (the one we use) has very crapy subform base class13:57
replaceafillis there any way to tell the main form to handle the subform errors?13:58
replaceafillthe action handler for the main form succeeds, so it doesnt say "there was an error"13:59
yvlI remember that it was messy13:59
replaceafill:(13:59
yvlthere should even be XXX in contact/browser/contact.py13:59
replaceafilli guess the subform in contact doesnt handle errors14:00
replaceafill# XXX: we don't handle errors for now14:00
replaceafill:)14:00
yvloh yes, that one :)14:00
yvlI think they made base class better in z3c.form 2.x.x14:00
replaceafill:O14:00
yvl(and we'll using that one some time soon)14:01
replaceafillcould i move cambodia to 2.x.x14:01
replaceafillusing [versions]14:01
replaceafilland it's a tiny problem actually14:01
replaceafillthe phone number for them has to be 9-10 digits14:01
replaceafillthe add form validations works for the phone number because the addform doesnt use subforms14:02
replaceafillthe edit form does14:02
replaceafillyou cannot edit phone numbers :P14:02
yvl:)))14:03
yvlwell, you can always work around it14:03
yvlgimme a moment...14:03
replaceafillsure14:03
*** dadeng has quit IRC14:08
*** dadeng has joined #schooltool14:09
yvlI'm back14:14
yvlyou know, just write your own handleAdd14:14
yvland do data, errors = self.extractData()14:14
yvlfor the form and the sub-form14:14
replaceafillyou mean in both of them?14:15
replaceafillor just the main?14:15
yvlon the main should be enough14:15
replaceafillcan i access the subform data from the main?14:16
yvlyou should be able to14:16
replaceafillok, i'll try14:17
replaceafillthanks yvl14:17
yvlumm, to compensate for my erratic writing skills:14:18
yvlbasically copy the handleAdd from z3c.form.form.EditForm14:19
yvland instead of just extracting data from self14:19
yvldata, errors = self.extractData()14:19
yvlsubform_data, subform_errors = self.subform.extractData()14:20
yvland proceed with applying changes only if no subform errors14:20
replaceafillthe main form handler comes after the main form update method?14:21
replaceafillbecause my subform gets updated there (main update)14:21
replaceafillwell, i'll try14:21
yvlwell, your subform should take care of everythin14:22
yvl(it should render itself along with errors, and omit changes if there are errors)14:23
replaceafillyvl, eeeeeeeeeeeeeehhhhhhhhhhhhhh :D14:37
replaceafillit worked :)14:37
yvlcongratulations ;)14:37
replaceafilli just had to break the main update (updatewidgets, updateactions, executeactions)14:37
replaceafillmain.update() does the three at once14:38
replaceafilland the subform wasnt accesible for the actions14:38
replaceafilli just put executeactions at the end and zas! it worked :)14:38
replaceafillugly ugly ugly14:38
replaceafill:P14:38
replaceafillalthough most cambodia is ;)14:38
replaceafillthanks yvl14:39
yvldon't give me too much credit ;)14:40
yvlbut yeah, that part of subforms is ugly14:41
yvlwe'll have to write our own base classes some time14:41
yvlbecause seriously - assigning css styles to actions and handling subforms is crappy now14:41
replaceafilldefinitely14:42
*** Aiste has joined #schooltool14:58
*** povbot has joined #schooltool15:32
*** dadeng has quit IRC15:36
*** menesis has quit IRC16:21
*** dadeng has joined #schooltool16:28
*** dadeng has quit IRC16:46
*** dadeng has joined #schooltool16:48
*** dadeng has quit IRC16:52
*** dadeng has joined #schooltool16:54
*** dadeng has quit IRC16:54
*** dadeng has joined #schooltool16:54
*** dadeng has quit IRC16:58
*** dadeng has joined #schooltool16:58
*** menesis has joined #schooltool17:09
*** dadeng has quit IRC17:12
*** replaceafill has joined #schooltool17:32
*** Aiste has quit IRC18:23
*** dadeng has joined #schooltool18:56
*** dadeng has quit IRC19:01
*** dadeng has joined #schooltool19:02
*** dadeng has quit IRC19:06
*** dadeng has joined #schooltool19:08
*** dadeng has quit IRC19:12
*** ColonelPanik has joined #schooltool19:37
*** ColonelPanik has left #schooltool19:41
*** replaceafill has quit IRC20:09
*** jelkner has joined #schooltool22:00
*** jelkner has quit IRC22:37
*** replaceafill has joined #schooltool23:51

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