*** SachaS has quit IRC *** mnemoc has quit IRC *** SachaS has joined #gnuenterprise *** mnemoc has joined #gnuenterprise *** lxf has joined #gnuenterprise *** kilo has joined #gnuenterprise *** johannesV has joined #gnuenterprise *** lxf has quit IRC *** btami has joined #gnuenterprise *** reinhard has joined #gnuenterprise *** johannesV_ has joined #gnuenterprise *** johannesV has quit IRC *** SachaS has quit IRC *** dcmwai_ has quit IRC *** johannesV_ has quit IRC *** johannesV has joined #gnuenterprise *** ayers has joined #gnuenterprise *** psu has joined #gnuenterprise *** holycow has quit IRC *** btami has quit IRC *** johannesV has quit IRC *** johannesV has joined #gnuenterprise *** johannesV has joined #gnuenterprise *** johannesV has quit IRC *** johannesV has joined #gnuenterprise *** johannesV has joined #gnuenterprise *** kilo has quit IRC *** lupo__ has joined #gnuenterprise huhu *** jamest has joined #gnuenterprise hey lupo__!!! long time no see will you be at LinuxTag? hi reinhard (will be back in 10 minutes, im in the library and doing some university stuff; but have to make a short break because i am about to go crazy) can anyone confirm this error in forms open a master/detail record and move down a few records in the master (the detail will update) then move back up and the detail will not change with the master *** titopbs has joined #gnuenterprise *** Alexliu has joined #gnuenterprise *** yure has joined #gnuenterprise *** Alexliu has left #gnuenterprise *** psu has quit IRC jamest: looking at it now reinhard: already commited a fix jamest: this fix will break moving back to masters with uncommitted detail records sigh it just disables caching result sets sorry i thought that return would prevent the reset of the details from being notified sorry I was not looking when you wrote your request for confirmation no, the notification would actually happen in _activateResultSet just 2 lines before the return interestingly I cannot even reproduce your effect i am back i will not be at linuxtag quite a lot to do right now jamest: I really wonder how removing that return could fix it at all lupo__: you will miss something :) what will i miss? :-) there are about 20 FSFE people there this year :) well, at least way more than 10 i know also, there will be people from FSFLA and Japan cool and it will be really cool :-) well i currently have to deal with neurobiology and biochemistry in the next few weeks :-/ reinhard: wouldn't that return cause the for dataSource in self.__details.keys(): to not make it thru all the items in self.__details.keys() lupo__: I pity you it's fun but also a lot of work jamest: you're right jamest: perfectly right jamest: it should be a "continue" and anyways, i have done all my duties till end of septemberg jamest: fsck, what a silly but! bug well, you want to fix my fix :) or should i can you commit it? sure can 2 jamest commits in less than a month sarge released maybe it is the end times then viva voce jamest: lol *** jcater has joined #gnuenterprise *** titopbs has quit IRC *** titopbs has joined #gnuenterprise *** lupo__ has quit IRC lo jamest: hehe jamest: the sky id falling! is* *** titopbs has quit IRC *** johannesV_ has joined #gnuenterprise *** johannesV has quit IRC *** yure has quit IRC something odd with the new datassources some of my data in my custom apps is returned as '1' seems to be at random you mean, it returns '1' instead of the real value? yes i'm passing in a list of fields to DataSourceWrapper what data type of underlying column? in the one I'm looking at one field is a varchar(8) one is an numeric(9,2) one is a text other fields are fine it returns '1' for all rows? or just for some? i row can you check whether the SQL statement isued is correct? 1 row hmm other rows are correct then? which would mean the SQL is correct that's a level 3 right? yep the most important debug level of all :) ah what I think might be happening the order of the fields that i pass in via fields=('a','b','c') doesn't match the order of the sql statement generated right as the fields are stored as keys in a dictionary (like they always were) but the return values seem to fall in line with what's being returned example: fields=('invoice_no',.............) but the first field in the select is a boolean that returns a 1 in this case which is what is mapped to the invoice # oh I understand darn,that's not it but that is what it's doing i find my invoice # is set into my subtotal field about in the record set *** btami has joined #gnuenterprise my date_generated field is set to the billto_city field value so it is definately scrambling the field/value pairs DBSIG2/ResultSet should handle that ResultSet._query_object_ stores the __fieldnames exactly in the order they were issued in the select and ResultSet._fetch_ uses that __fieldnames list do you use a datasource of type="sql"? wow, just installed ubuntu (after XP collapsed again, and decided to not reinstall it on this box anymore) ! :) :) reinhard: yes, but not in this case * btami (kids) has another XP box for games bbl *** btami has quit IRC jamest: can you maybe check if in the _fetch_ function the __fieldnames list matches the list of fields issued in the query? DBSIG2.ResultSet.ResultSet._fetch_ that is holy shit that's ugly this table has 60 fields i need in the fields=('field1','field2','field3') i had a 'field4,field5' <- Note the missing 's means it's one field name oh sh*t that explains a lot the sql of course returns 2 columns for that yes which blows the crap out of sequence but doesn't generate any errors so it would be capable of doing lot of damage yes as the unbound fields (field4 and field5) still returns a value of None so the app goes along just fine reinhard: would the best way to fix this be to adjust the registerField to throw an exception if a comma shows up in a field name? or is there some other datasource magic in there now that would be better applied I think GDataSource.referenceField would be the best place to check this er, sorry referenceFIeld yes, there is no other way to introduce a field into the list other than referenceField anything other than comma that should be checked against? * jamest wonders if period is also dangerous space hmmm different idea how about quoting all field names in the generated sql? what would a select like this do: SELECT "foo", "bar, baz" FROM table should blow up just fine with an invalid field name at least in postgresql would you be fine with that? verified i would ok I like it better than checking for specific characters so that'd be in the buildQuery in dbsig2 still right? working on it but yes holy crap! something didn't change! (you should do something about that :) well actually it would be in _query_object_ in dbsig2 what = string.join (fieldnames, ', ') ok, that's better :) is what we have now what = '"' + string.join (fieldnames, '", "') + '"' would seem logical at first however that could still break with fieldnames containing " characters yes what kind of a server would allow " in the field name as i'm pretty sure that's reserved in SQL ok, I'll commit this then jamest: please test (fix is completely untested) ok um one minor thing string.join is depreciated in 2.4 i know we require only 2.3 what? but I think all of the 2.3 series will also accept the 2.4 way string.join depreciated?? we must fieldnames.join() now? almost all string functions are no something like ','.join(fieldnames) ah yes that way around, right i remember http://www.python.org/doc/2.4/lib/node107.html i've started converting my code as I hit it even though i run 2.3 so figured i'd bring it up here as something that might be worth concidering nice we only use string.join 148 times in gnue :) thanks for telling I'll add it to my code cleanup checklist reinhard: it's any string functoin though which we probably use others actually it boils down to "don't import string" doesn't it? pretty much i think there are 2 or 3 functions still in that module ok added to my list * reinhard considers writing up that list as a technote as it contains quite generally useful "guidelines" like write docstrings document exceptions foo vs. _foo vs. __foo vs. _foo_ naming public functions before private functions etc just all those things I regard as "code cleanup" whithout any functional change i think that is a good idea bbl *** johannesV_ has quit IRC *** SachaS_ has joined #gnuenterprise *** yure has joined #gnuenterprise *** ayers has quit IRC *** ayers has joined #gnuenterprise *** SachaS_ has quit IRC *** ayers has quit IRC *** kilo has joined #gnuenterprise good night all *** reinhard has quit IRC *** SachaS has joined #gnuenterprise *** jamest has left #gnuenterprise *** sjc has joined #gnuenterprise *** titopbs has joined #gnuenterprise *** yure has quit IRC *** jcater has quit IRC *** sjc has quit IRC *** titopbs has quit IRC *** kilo has quit IRC *** ajmitch has joined #gnuenterprise *** SachaS has quit IRC *** mnemoc has quit IRC *** mnemoc has joined #gnuenterprise *** holycow has joined #gnuenterprise *** ayers has joined #gnuenterprise *** holycow has quit IRC