IRC log of #schooltool for Wednesday, 2011-05-04

*** menesis has quit IRC02:35
*** alga has quit IRC03:05
*** th1a has quit IRC03:56
*** aks has joined #schooltool06:00
*** alga has joined #schooltool09:31
*** aks has quit IRC09:49
*** povbot has joined #schooltool09:54
*** povbot has joined #schooltool09:59
*** aks has joined #schooltool10:21
*** aks has joined #schooltool10:21
*** menesis has joined #schooltool11:17
*** ignas has joined #schooltool12:48
*** aks has quit IRC14:20
*** th1a has joined #schooltool15:34
*** klausade has quit IRC16:53
*** klausade has joined #schooltool16:57
*** alga has quit IRC17:30
*** ignas has quit IRC19:13
*** alga has joined #schooltool19:46
*** menesis has quit IRC20:23
*** fsufitch has joined #schooltool21:01
fsufitchaelkner: ping21:02
aelknerfsufitch, good afternoon21:02
fsufitchaelkner: so im going to continue getting this z3c.form thing to work21:09
fsufitchgot some errors to take care of21:09
aelknersounds good21:10
aelknerdon't let yourself get stuck on anything if you can ask me21:11
fsufitchthis is odd, i'm getting:21:15
fsufitch   TypeError: __init__() got multiple values for keyword argument 'cluster'21:15
fsufitchwhen i subit the z3c form21:16
fsufitchaelkner: ping21:17
aelknersend the diff please?21:19
* th1a slaps his forehead.21:20
th1aIf only we had some kind of system for managing changes in source code.21:20
fsufitchth1a: we *are* using bzr, just trying to keep broken commits to a minimum21:21
th1aYou can make as many broken commits as you want in a working branch.21:22
th1adevelopment branch21:22
aelknerth1a, i got into the habit of only commiting when tests pass21:23
fsufitchbut... they're ugly21:23
aelknerignas was clear about that back in the day21:23
aelknerit allows the reviewer to see clearly what code lead to things being broken21:24
aelknerfsufitch, in this case, however, i'm having problems looking at your diff21:24
fsufitchhow come?21:24
aelkneri get: Malformed patch header.  No orig name21:25
aelknerwhen you do a bzr st21:25
aelknerdo you see anything finny, like an unknown file?21:25
* th1a rolls his eyes.21:25
fsufitch2 added files, 2 modified files21:25
aelkneryou dsent me the st output, not the diff output21:27
fsufitchproper diff sent now21:28
fsufitchbah, people behind me got delicious smelling food and it's making me hungry21:30
aelknerfsufitch, ok, first of all, i don't see how you could be having an error since i don't see any tests21:31
fsufitchi am just trying to use the web interface atm21:31
aelknermanager.serve() gets you the web interface, so why not use it21:31
aelkneri've been trying to steer you away from using make run and favor the test-driven approach, so...21:32
aelkneralso, after you've added the test and recreated the problem, go ahead and commit and push21:34
aelknerbefore pinging me21:34
aelknerfrom time to time we can commit broken code so that i can get to it and figure out what's up21:35
aelknerfrom your diff, i don't see anything wrong, so i'l need to run the test myself to recreate21:35
fsufitchill write the test21:37
fsufitchbut first i think im going to go get some food21:38
aelknerif i don't see your ping after five minutes, call my cell21:39
fsufitchcould you send me your cell again? i checked my phone and it's not there, even though i thought it was21:39
fsufitchnow, im off to go grab a bite21:41
fsufitchbbiab :)21:41
fsufitchaelkner: ping22:45
aelknerfsufitch, pong22:46
fsufitchback to work and writing that test, but now, question: how do i handle the list form elements?22:47
fsufitchCredit Codes is a list field, and z3c.form is rendering it as such, but i'm not sure how to work with it in the test22:47
aelknerah, the list widget22:48
aelknertry, doing manager.serve() right after calling up the add form and look at what comes up22:48
aelkneryou can use firebug to inspect the elements for their names/ids22:49
fsufitchhmm okay22:49
fsufitchi was doing that22:49
fsufitchbut my worries are mainly concerning the fact that this involves javascript22:49
aelknerhow so?22:50
fsufitchtestbrowser doesn't run javascript?22:50
aelknerwhy do you need it?22:50
aelknerit's just a form that the user fills in22:50
fsufitchthe list widget involves pushing buttons to add new list elements22:50
aelkneryou can submit forms even without javascript22:51
aelknerbut i have to find the example22:52
fsufitchoh, the "Add" button is a submit button22:52
fsufitchi thought this would involve Ajax or something22:52
aelkner>>> manager.getForm().submit()22:53
aelknerno ajax22:53
fsufitchyes but that pushes the actual submit button, not the Add button22:53
aelknerok, the getForm().submit is useful when you set a list value that has onchange="submit"22:54
aelknerso that's not what you want22:54
fsufitcher, yeah22:55
aelkneryou can just getControl(name='?').click()22:55
aelkneror even just the text of the button, if it's not ambiguous22:55
aelknerok, maybe 'm lying again :)22:56
fsufitchlike, this is what i need to click
aelknerif it's the case that the button is not a submit button22:56
fsufitchit *is* a submit button22:56
fsufitchbut it's not "the" submit button22:56
aelknerok, do me a favor and push the broken code so i can see the same things22:57
fsufitchok, one sec22:58
aelknerok, running tests23:01
aelknerhow did you get'New Course Info') to take you to the add form?23:07
aelknerthat needs to be getControl('...').click()23:07
aelknersorry, getLink23:08
aelkner>>> manager.getLink('New Course Info').click()23:08
aelkneranyway, i'm looking for a better widget for lists23:13
aelkneri know we have one somewhere in schooltool23:13
fsufitchand i'm using getLink now23:14
aelknercheck it out:23:16
aelknerEnumValueList is derived from List23:17
aelknerthen look at schooltool/basicperson/browser/configure.zcml23:17
aelknerwhere EnumValueList is registered against zope's standard TextAreaWidget23:18
aelknerthat widget is handy for handling lists of text lines which is ok for now23:18
aelknerso what you can do is add your own version of the List-derived interface class to your interfaces.py23:20
aelknerand register the widget against it in browser/configure.zcml23:21
aelkneryou could call it CourseInfoValueList for now i guess23:22
*** fsufitch has quit IRC23:26
*** fsufitch has joined #schooltool23:30
aelknerfsufitch, i sent you a diff that gets the TextAreaWidgets to appear23:52
fsufitchthanks, was doing it myself, but had to go afk for a bit23:52
fsufitchill apply your diff23:52
aelkneryou can use \n inside the value string when you go to fill in those fields23:53
fsufitchrunning ftests now23:56
fsufitchawesome, thanks :)23:58
aelknernp, that's what i'm here for23:58

Generated by 2.15.1 by Marius Gedminas - find it at!