*** Amorphous has joined #gnuenterprise *** kilo has joined #gnuenterprise *** Morphous has quit IRC *** |dcmwai| has quit IRC *** SachaS has joined #gnuenterprise *** kilo has quit IRC morning *** reinhard has joined #gnuenterprise good morning reinhard *** someon has quit IRC *** |dcmwai| has joined #gnuenterprise *** btami has joined #gnuenterprise *** |dcmwai| has quit IRC *** |dcmwai| has joined #gnuenterprise good morning all i'v just uploaded my 2. attempt to Gnue .exe packaging with py2exe http://www.gnuenterprise.org/~btami/Gnue-Tools-0.5.3.99-svn5560.exe *** holycow has quit IRC reinhard: please try it, if you have time... *** holycow has joined #gnuenterprise *** |dcmwai| has quit IRC an interesting appserver-related discussion: http://www.atug.com/andypatterns/rm1.htm hi btami hi SachaS SachaS: have you got any 95/98/Me around? btami. thanksfully not :) ok, so you arn't my candidate to test .exe :) yeah no, sorry :) however you are the best appserver pioneer! haha thanks. having a busy 2 weeks of appserver behind me. it rocks. procedures are working ... so your basically set to code business logic! *** holycow has quit IRC one thing i can imagine an embedded scintilla editor component in classrepository.gfd as you can see in designer trigger editor the appserver core developpers deserve the thanks yeah that multiline text box is a bit annoying to code in. from my understanding that editor component must be a forms component too as designer is not a gnue application but a wx? application. yes, but a stub GFComponent code is exit (from jan) and the gtk2 ui uses it for bonobo or what... well yeah such an code edit widget would be nice. well we might have to ask jan then... bbl *** btami has quit IRC presentations of the open source business conference 2004: http://www.osbc2004.com/open_presentation.html *** kilo has joined #gnuenterprise *** btami has joined #gnuenterprise *** damokles has joined #gnuenterprise Hi together *** reinhard has quit IRC *** SachaS has quit IRC *** reinhard has joined #gnuenterprise *** SachaS has joined #gnuenterprise Have anyone experiences with Eclipse and python? *** dimas has joined #gnuenterprise *** PeterD has joined #gnuenterprise damokles: not me thanks btami damokles: why eclipse? have you tried scite, idle, eric3 ? *** PeterD has quit IRC I installed suse 9.0 and eclipse is right there. ah, ok *** PeterD has joined #gnuenterprise No I haven't tried yet. But i have had a look at eric3. The UI seems a bit overcrowded to me. hey PeterD Hi Reinhard just wanted to write you a mail to ask you to join IRC :-) thanks hi reinhard do you remember to your dropdown changes? they are completely broken in all ui I removed /logig/laguage subdirectry got new error from gnue.common.logic.language import getLanguageAdapter, RuntimeError ImportError: No module named language PeterD: is it possible that you have a mixture of 0.5.3 release series and svn snapshots installed? IIRC you have updated gnue-common to the current svn version, right? then you also have to update gnue-forms and gnue-appserver sorry i have to run for lunch can you be here in about 1 1/2 hours? PeterD: did you see what I wrote? * rm-lunch thinks he just had a connection problem PeterD: is it possible that you have a mixture of 0.5.3 release series and svn snapshots installed? IIRC you have updated gnue-common to the current svn version, right? then you also have to update gnue-forms and gnue-appserver sorry i have to run for lunch can you be here in about 1 1/2 hours? btami: can we talk after lunch? sure no, I updated all tools try to be around *** thierry_ has quit IRC *** lekma has joined #gnuenterprise *** thierry_ has joined #gnuenterprise *** damokles has left #gnuenterprise btami or PeterD: you here? whi Reinhard PeterD: okay PeterD: my current guess is that you still have a logic/language directory somewhere under /usr/lib or /usr/local/lib in the logic directory ya the was (in earlier versions) a language directory now there is a language.py file if you have both python chooses the wrong :( btami: i think i remember the fix i did for dropdowns it was something with unicode IIRC btami: what did it break? the dropdown shows nothing from db tried it on gtk2/wx/win32 the one which I deleted was: -/gnue/common/logic/language is there onother one somewhere? actually not and you still have a -/gnue/common/logic/language.py there? s/still// btami: seriously? no yes :) is language.py should be in /logic/ directory? PeterD: yes PeterD: this should be included in current common svn snapshot in that case language.py is missing PeterD: let me check PeterD: i think there might be a bug in our snapshot generation mechanism I've check snapshot source dated 20040327 and language.py is missing to PeterD: you downloaded snapshot from our webpage, correct? PeterD: yes, you found a bug in our snapshot generation yes, correct PeterD: i will care that it will be fixed ASAP (== today) so I should wait for new snapshot which will be generated today 20040329 if you can wait, then yes and try again if you want to go on, i can DCC you language.py but i think it would be better to install fixed snapshot as it could be other files are missing, too I agree don't we have hourly snapshots? btami: at least not on our website (well, at least i don't find them) one more question: the website missing link to IRC logs? http://www.gnuenterprise.org/irc-logs/ thanks np PeterD: I'll be here, tomorrow, too PeterD: I'd like to help you again tomorrow if you want/need :) btami: re dropdowns PeterD: maybe you can download a tarball from http://www.gnuenterprise.org/cgi-bin/viewcvs.cgi/gnue/trunk/ btami: did you test with appserver or in 2-tier mode? 2-tier ok is there a sample form in gnue-forms/samples i can try to reproduce? zipcode? i will try it too hmm works perfectly for me i have to say my test for uses static datasource for dropdown like connection.gfd ah i'm not sure if it counts... connection.gfd also works for me... do zipcode.gfd and connnection.gfd work for you? connection works I try to download tomorow and let you know here trying zipcode... if you have a second, could you please test something different for me? import kinterbasdb print kinterbasdb.paramstyle ? (erm - that was for btami) >>>qmark btami: thanks so it's kinterbasdb related? btami: no, that's for a completely different change we're discussiong hi everybody a small question can i put an url in ImportPath parameter in gnue.conf ?? reinhard: the problem occurs only when the key filed is numeric type, not char if i changed it to varchar, dropdown works again btami: aaahhh btami: yes, i broke that btami: dodm :) oops didn't even have the idea that a key field could be non-string :( will fix in a second lekma: checking it, not sure it doesn't work for me :( btami: sigh btami: there are still tons of str() in common and forms and in reports and designer :) GDebug.printMesg(10, "Field %s changed after nextRecord (%s,%s,%s,%s)" % (field, self.initial, self.grouping, self.fields[field], val)) from GRDataMapper.py DB000: File "c:\python23\Lib\site-packages\gnue\reports\base\GRDataMapper.py", line 164, in _precheckNextFields DB000: GDebug.printMesg(10, "Field %s changed after nextRecord (%s,%s,%s,%s) " % (field, self.initial, self.grouping, self.fields[field], val)) DB000: UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 9: o rdinal not in range(128) sigh i can't properly fix it the problem with dropdowns i can a) let it like it is, then dropdowns with non-ascii strings work, but non-string dropdowns don't b) revert that change, then numerich dropdowns will work again, but non-ascii string dropdowns will break again c) make some ugly hack in the code that fixes the symptom but not the real problem i guess the GNUe type way to do things is c) ;-) i can live with a) how ugly would it be lekma: no success kilo: well, not ugly in the way of "unbeautiful" more ugly in the meaning of "not the right(TM) way to do things" kilo: thxs btami: seriously, i'm not satisfied with a) your second definition almost exactly matches 'revolution' b should not be considered at all in fact i see the problem already starting in GFForm.py where the list of allowed values is built with key = "%s" % rs.current.getField(self.fk_key) which means that integer fields become a string key string fields become a string key unicode fields become a unicode key what if all type would bcome unicode key i have no idea what i would break with that i see i have zero overview over forms/reports code just saw that there are still a lot _allowedValues[str(foo)] in the code and I wonder why that doesn't break for us using non-ascii chars in allowedValues must be code that's never called ;-) but that gets me to an idea instead of str(foo) i could there also do "%s" % foo which would have the same effect on type conversion that should work hmmm re code never called: i agree duh did you notice that there's no state in the U.S. starting with a B? not with Q however the problem *should* be fixed btami: could you test please? then C is the way to go sure thanks works for me btw. the "where clause" bug, aka Petõfi nof fixed :) you know, when the where clause of an update sql sentence constructed and the original row contains some non ascii btami: yes i know k btami: yesterday, i was trying to talk jamest and jcater into using parameters in sql statements which would fix the problem but meanwhile i could reproduce the problem which means i could also fix otherwise * btami trying to start reading yesterday log btami: is this actually a "new" bug, or did it never work? new means introduced after 0.5.2 :) ok with 0.5.2, we were running with 8-bit strings encoded via gnue.conf setting, correct? yes you can try it with your real name in a varchar fields and then trying to change it in some gfd btami: yes *** PeterD has quit IRC reinhard: back to paramstyle, if you are interestd how about kinterbasdb http://kinterbasdb.sourceforge.net/dist_docs/usage.html btami: thanks btami: looking at the unicode problem now if i load a record that contains a non-ascii string i can't even modify this field nor delete btami: what i mean i get tracebacks on keypress already not only on try to commit wow *** btami has quit IRC *** kilo has quit IRC *** thierry_ has quit IRC the forms manual is very sparse found what I needed. *** lekma has quit IRC *** lekma has joined #gnuenterprise reinhard: do you think there will be something necessary to "commit" the created business objects without a commit of the form? *** jamest has joined #gnuenterprise *** dsmith has joined #gnuenterprise SachaS: i don't think so you cannot have a commit just on the appserver memory? eg just on the created business objects within the appserver ... a commit on just the created business objects within the appserver ... stupid question: is there any way to access the list of datasources included in a form, from the same form's 'ON-STARTUP' trigger ? SachaS: no, that won't work the creation of a new object is always a part of a transaction and you can only committ the complete transaction otherwise you could fool any kind of validation by changing stuff and then only commit parts of the changes lekma: off the top of my head, no does that mean, that whenever the appserver creates/modifies and deltes a business object, it becomes into a commitable state? lekma: what would you want to do with that list? *** lxf has joined #gnuenterprise SachaS: yes jamest: for each datasource i would like to import a block from a gfl... it's a test ok. reinhard: silly thing. the "save" icon does not get highlighted when the appserver does change something ;) SachaS: yes, but that's a problem of forms :) haha ok. we will not touch that ;) we??? i talk of we ;) thats funny. :) i would think one could add a trigger function to get that list from the form object other question. do you think a global delete() procedure is missing? delete(businessObject) iirc that is where the datasource dictionary is kept jamest: now with triggers capable of returning a value ... do you think the commit() trigger/function could return a value? like if the commit() was successful. If thats not the case yet... SachaS: i don't understand, functions inside triggers have always been able to return a value SachaS: i don't recall if commit() already does, then again i don't recall how datasources handle failed commits, i think they throw an exception jamest: when I call form.commit() does that have a return value? oh ok. so best to use try: except: in a trigger? it returns a string containing an error message or None i just looked also commit() is defined as global function in the trigger namespace so if form.commit() is None: print "success" so you don't have to do form.commit() just commit() should work ok. yes, i think that if statement is ok WOW! I have been obtaining all '_triggerFunctions' dictionaries found in GNUe code, and including their references in forms Developers-Guide, so I guess that nearly all attributes of GForm objects are now included. SachaS: businessObject.delete () would do this this is from Jose on the ML reinhard: is businessObject.delete() implemented? ;) SachaS: yesss reinhard ok. was a silly question ;) man, maybe helping people on the ML is a good thing after all. who would have thought it? =) it seems like our documentation is ... ... erm ... ... much too modest :) jamest: :) docus are not user friendly: i am writing forms today and the Forms Developper manual has to many [todo]'s. tooooo many even SachaS: sigh, i'm working on it, honest jamest: some dbsig2 drivers define a class variable that holds the dbsig2 module for postgres drivers, it's _pg_driver for oracle drivers, it's _sig_driver reinhard: um, what are we talking about? i'm slow remember :) jamest: :) jamest: every dbdriver in common based on the DBSIG2 driver reinhard: anything you can do about errors in procedures? eg. i test my procedures by running them. when they fail, i do not get a very good error message. sample: needs a module that it loads like psycopg pyPgSQL Dispatching: Session.call (1, 'sales_salesOrder', ['12344444818670298240729722867778'], 'createInvoice', '') Error occured during method invokation: Traceback (most recent call last): File "", line 27, in createInvoice File "/home/sacha/gnuenterprise/gnue/gnue-common/.cvsdevelbase/gnue/appserver/language/Object.py", line 122, in __setattr__ raise AttributeError, attr AttributeError: invoicecreated dxoracle etc some drivers store the loaded module object in a variable in some drivers, this variable is named _pg_driver in other drivers, this variable is named _sig_driver etc jamest: got me? :) ok, but what is this in reference too i'm not sure why we're talking about it :) SachaS: i know, the line of the source code is not printed in the trace back and i have no idea why jamest: my question now is would you be ok to use _driver uniformly? i think it couldn't hurt but want to be sure reinhard: ok. good you know it. its hard to scroll to line 27 in the multiline box ;) SachaS: well, another note yes SachaS: you have to subtract 6 from the line number it gives you :( dah ;) ok. i put print "Hello World" statements into the source :) i think at some point we will have to fake a traceback instead of using what python gives us SachaS: the error message basicalle means you're accessing an undefined attribute "invoicecreated" oh and reinhard: i understand what you want to do to "extend" tables. so when you change tables (add/remove/rename) fields, you only have to restart the appserver to update the tables. right? instead of going through the gnue-gsdgen SachaS: no SachaS: johannes is going to do it this week, so just wait and see :) reinhard: i'm looking now i don't think it hurts anythin ok. ok. will see. jamest: ok, thanks reinhard: you doing this to clean something up? it's necessary to make our parameter experiment possible 'cause i will have to check _driver.paramtype and i'll have to call _driver.timestamp to create the driver internal date/time objects well, makes sense to make them consistant anyway for less confusing code jose also sent an updated dtd for forms guide i assume we need to get copyright assignment from him on this before I can put in the docs? * jamest doesn't recall making exceptions on docs *** nenhum has joined #gnuenterprise hi nenhum hi *** sjc has joined #gnuenterprise hello sjc jamest: hi jamest: in designer where i set the datasource: what is the "explicitfields" field used for? for example: i want only those records where "xyz" == True where can i set that on the datasource level? i think this hard codes the fields tied to the datasource hmmm in designer? wow, i dunno you need to add a conditional to that datasource like this i saw in the source of .gfd those conditional...i just done know where the syntax is described ;) or how I set it in designer. ok. i read yours. ah, so you have a sample already? yeah somewhere i saw it.... was wondering if i can set it in designer ? i can find a more complex example if you like as i am using designer. i honestly don't know, let me look *** lxf has quit IRC ok. designer is cool as well, actually. lots of properties to set for each field! *** lxf has joined #gnuenterprise there is a "default (query)" for a field...it works that way :) hello lxf SachaS: i can't find anywhere in designer that lets you build the conditional, maybe jcater knows if it's possible SachaS: that only enters the value when put in query mode the user can then alter it which, if you're trying to prevent them from getting to something isn't a good thing :) jamest: yeah i saw that behaviour. even if you have the field readonly, in query mode they can change it :( :) ok. will check with jcater then. *** jcater has joined #gnuenterprise jamest: is there a command to "clear" the form? eg when I call the commit() function I want to have a "clear" of the form? hi jcater. jcater: is there a way in designer yet, which allows you to have conditional queries? *** lxf has quit IRC *** lxf has joined #gnuenterprise SachaS: i believe so, just a sec jose did up a whole trigger function guide for formw i need to figure out if I can commit it :) ok. great. hi jcater *** nenhum has left #gnuenterprise jcater: i think there is a bug in the nightly snapshot generation jcater: you should delete MANIFEST before running "setup.py build" jcater: if that isn't done, newly added files won't be included into the snapshot tarball ok SachaS: we don't seem to provide a clear() :( jcater: as a result, .../logic/language.py wasn't included in the tarball which was the reason for the problem that Peter had SachaS: form wide each block does provide a clear() however ok. will give that a try. if I have a gnue common based app and want to use the configuration system to specify db connections is this possible? sure how? :) well, you using config system already? I want to ;P ah, well, there is a simple setup in the Developers Guide need to read the guide again and look at you contrib thing that goes over setting up config it's simple jamest: blockname.clear() worked. I can then programtically set the connection params? chillywilly: ? you can specify the connection you want what I meant was it normally looks for a system wide connections.conf right? I want to use the app config file values to set connection params...so I can pass this to a connections object constructor? mr jamest: can I run a command form a trigger? :) i think i have to document all this as well :) chillywilly: I've never attempted that chillywilly: not directly SachaS: yes so I always need 2 config files? you'd have to look at the internals of GConnections.py but not sure you'd want to do that jamest: whats the magic keyword ? :) that kinda sucks SachaS: import os; os.system("ls -l") iirc thanks. ok will try that. SachaS: jcater got it ta *** lxf has quit IRC reinhard: are you still here or having dinner? just about to leave will you come back later again? i think so i want to hear comments, maybe when we meet again, how the gnue 2 gnue communication could happen. just your thoughts, first ;) will talk to you later then *** dneighbo has joined #gnuenterprise *** derek has quit IRC does anybody has any useful example on how to import a block using tag ?? i'm stuck on this obviously simple task... :( *** jamest has quit IRC *** ogger has quit IRC *** jamest has joined #gnuenterprise *** dimas has quit IRC *** ogger has joined #gnuenterprise hello ogger stupid question 2: does anybody has any useful example on how to import a block using tag ?? reinhard: interesting patch on the dropdowns i'm really stuck on this obviously simple task... :( reinhard: i guess I don't understand why that patch would fix autocomplete lekma: i don't , but let me see if a sample is in the guide there is a sample but it doesn't work (for me) what do you have? something like this i'm trying to override the datasource in the imported block the datasource is only defined in the form not in the library i can't find anywhere I'm using import's for even a reference :( there is a chapter on impor tags in the form tech-reference s/impor/import *** lekma_away has quit IRC ebXML became an ISO standard, ISO standard 15000 *** lekma_away has joined #gnuenterprise *** lekma has quit IRC jamest: the patch doesn't fix autocomplete it fixes non-string keys in _allowedValues ah, autocomplete seems to work for me now though and it didn't before? *** wendall911 has joined #gnuenterprise *** btami has joined #gnuenterprise btami: i've found a single character fix for our encoding problem but i think it would need some more testing ok, i'm ready :) although it worked for me, i don't use *that* many features of forms/reports in datasources/drivers/Base/DataObject.py line 69 set _unicodeMode to 1 instead of 0 and everything worked for me even the tracebacks on keypress hmm, it was jan IIRC it would be good to ask him, what was the reason not to default it to =1 yes that was him AFAICT the reason could be with 1, all field values are UnicodeType instead of StringType so when forms/reports reqeusts a field value it will get unicode instead of string however this was always true for appserver so any frontend that worked with appserver should also work with unicodeMode set to 1 maybe hes plan was to wait for all str(...) -> textEncode(...) happening everywhere... then change it for =1 * btami is testing hes .gfd .grd files with =1 first question would be does it fix the bug for you, too? trying :) wow, work with wx but win32 needs more TCL :8 tlc even :( not to worry just commit it and the win32 maintainer will fix it oh, wait.... :)))) :) jcater, when i look at your rtf report samples, I do understand why your people love it. its very easy. yes, it's nice DB000: File "c:\python23\Lib\site-packages\gnue\reports\base\layout\GRField.py ", line 53, in process DB000: self.format)), '\r','')) DB000: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in posit ion 1: ordinal not in range(128) with =1 ----------------------------------- DB000: File "c:\python23\Lib\site-packages\gnue\reports\base\GRDataMapper.py", line 164, in _precheckNextFields DB000: GDebug.printMesg(10, "Field %s changed after nextRecord (%s,%s,%s,%s) " % (field, self.initial, self.grouping, self.fields[field], val)) DB000: UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 9: o rdinal not in range(128) with =0 ------------------------------------------- trying my simple test report database containing non ascii btami: let me guess: did last work with 0.5.2? yes :) designer can produce errors too, if you try to add a non ascii name to your report creting with wizard DB000: File "c:\python23\Lib\site-packages\gnue\common\definitions\GObjects.py ", line 340, in dumpXML DB000: xmlnamespaces=xmlnamespaces) DB000: UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 83: ordinal not in range(128) ------------------------------------------------ * btami thinks US peop was happy before unicode age :) :) btami: that's not fair we'd never say that (in public) /msg jamest don't you miss the pre-unicode days? then comes dcmwai/jan/reinhard/btami/arturas....... jcater. when I run grcvs i get dadida whereas merge-rtf expects thats for mailmerge ah I guess merge-rtf needs to be fixed :) * jcater uses report-filters.conf to do it all at once to do it all at one? to do it all at once? ok reading report-filters.conf a must read for all gnuers: http://www.joelonsoftware.com/printerFriendly/articles/unicode.html damn non americans! with your driving on the wrong side of the road and complicated text stuff that makes my brain hurt wait, 1/2 jcater's contributed code makes my brain hurt too :) @ping pong @pong hehe sorry my connection went out damn router doctor, doctor, my brain hurts like that's unusual me :) jamest: but I'm at work :( reinhard: :) on dropdowns is there a reason we allow values that aren't predefined? you ask me that?? we do? yes we do ? did we do before? how? or did i change that? it's been this way for years since the start of input handlers I'm confused i don't think that's right but it's a dropdown playing w/ it today got me thinking about it again how do you enter a non-valid value? it's very annoyed me enough to ask why oh, i don't think it'll keep them jcater: probably with the keyboard :) just let you enter they them which I can see some neat used for An autocomplete text field (no dropdown) that pulls based upon user input Take entering the model of a car for instance a dropdown that lists standard options but lets users enter their own if the standard dont fit i don't want to sound like dere :) however the current dropdown seems wack but in delphi that was an option for dropdowns reinhard: nor do we want you to err derek of course of course :) though its no fun to bag on him when he isn't here :) anyway, just wanted to ask if there is a reason to the dropdown madness removing that "feature" would work for me :) btw we need to chain Jose for the ML down with date/time values with microseconds and make him test, debug, and document :) i think we will always have issues as he seems pretty thourough e.g. i saw today in the oracle dbdriver _dateTimeFormat = "'%Y-%m-%d %H:%M:%S'" which i read as fractions of a second would not get through well you have to be somewhat careful in how you "remove" it you don't want the end user to be able to enter it BUT you run into the issue of what if a queried record contains something invalid it shouldn't implicitly change existing data reinhard: you can commit self._unicodeMode = 1 in DataObject.py now win32 is OK with that now btami: ok, you take the responsibility ;-) thx :) btami: thanks for testing now while we're at breaking things ok, the rest of bugs now in reports/designer :) I think I'll commit the first part of our experimental parameter usage reinhard: that isn't blocking the fractional seconds i wrote a small, non gnue test app using dbsig2 api all it did was query db table containing timestamps and print the output print the return list it was a mess of different return results on timestamps *** _florin_ has joined #gnuenterprise jamest: then wait until you try a time field :) reinhard: ? <_florin_> good evening hi _florin_ hello _florin_ jamest: most databases have date, time, and timestamp (being date + time) ah, you are saying time is worse <_florin_> hi reinhard, jamest jamest: can you give a quick overview what you had? that's good to know jamest: yes sure jamest: IIRC one of the python drivers traceback's on querying time fields :) postgresql table of notes, following structure jamest: i mean what results you got ah, no tracebacks just not good data back that update error reported on the ML i think most drivers would return mx.DateTime results? nope you have all the postgresql drivers there? yep do the following make a small script that does the following night all *** btami has quit IRC import somedriver as db prodDb = db.connect('host=rdbms dbname=gnue user=%s password=%s port=5432' %(prodUser,prodPassword)) jamest: just writing a script (i'm over simplfying) prodCursor = prodDb.cursor() prodCursor.execute(selectString) while 1: invoice = prodCursor.fetchone() if invoice == None: break print invoice (yes, i'm butchering an existing script :) then look at that output jamest: give me a second please btw, the connect() changes between postgresql drivers :) most take the above jamest: yes, i'm aware of that ok, just trying to be helpful :) w/o doing too much real work :) _florin_: anything we can help you with? jamest: ok, tested jamest: wanna know the results? Driver Date Time Datetime ---------------------------------------------------- psycopg mx.DateTime mx.DateTime mx.DateTime popy string string(rounded) string(rounded) pgdb string string(rounded) string(rounded) pypgsql mx.DateTime mx.DateTimeDelta string(rounded) ---------------------------------------------------- i think i have to take that back about the traceback btw for a time db column, psycopg returns a mx.DateTime object with the date set to 1970-01-01 (!!) jamest: IMHO the question arises whether our dbdrivers should unify this? reinhard: yes yes, yes, yes :) we actually discussed this a few months ago ok, let me commit a quick fix how we wanted to standardize what the dbdrivers returned and not just with dates j/k so as a first step, we would have to standardize on what datatypes we want to provide well, unicode of course :) I personally want fixedpoint returned for numbers how about you, jamest? then we would have to standardize what python type we would want to use for those and I'm ok with mxDateTime for date time jcater: with my first question, i actually meant like we want strings, numbers, booleans, date, time, and datetime then 2nd step is string = UnicodeType number = FloatType or IntType or LongType boolean = BooleanType for Python 2.3, IntType for earlier I have to say I'm not happy with mx.DateTime as it doesn't let you know if it's a date, a time, or a date + time value but what's a better alternative? date support in python sucks * jcater doesn't like mx either, fwiw from 2.3 on, python has a lib with a date, a time, and a datetime type ah sigh I wish sarge would get released metoo as we'd *really* benefit from making 2.3 the min version in many ways I would happily use those types in our interfaces as well as the Boolean type *** kilo has joined #gnuenterprise jcater: did you get the MANIFEST problem fixed? I think PeterD will try to download a new snapshot tomorrow how can I get the reference of an python object (dict)? SachaS: I don't understand your question reinhard: how can we standarize on the return values? reinhard: its ok. i think i got it. was accessing a entry of the dict, so i got confused why its type is not a dict. everything fine. thanks. are you talking about casting the values in the select then manipulating the returned value to get what we want reinhard: yes as it sets now it a fscking disaster I'm having it rm -rf, then "svn co" a fresh copy as I've hit several things where updating causes problems over time *** _florin_ has quit IRC rumor says sarge in a few months jamest: yes standardizing what the RecordSet can return (and expects to receive) jcater: so we'd do to_char(timestampField,'mask') then recast as I didn't find any way to handle this in the dbapi2 spec well, I'd assume we'd return some type of Date[Time] class either python2.3's builtin jamest: the problem starts with the fact or mxdatetime, or something that you don't know that it's a timestampField so we're stuck w/ what the driver authors implement reinhard: exactly um hang on *** _florin_ has joined #gnuenterprise jamest: but you should be able to find out with cursor.description yes, that's what I was about to say though I wonder if referenceField shouldn't tell the dataobjects what your app is expecting i.e., reports and forms both know what they think a field is so expects it back in that format <_florin_> i don't know whom it concerns, but the developers/IRC link is broken on the website. yes we're still working on all that but thanks for letting us know <_florin_> you're welcome -- when it comes to complaints, i'm your man ;-) lol jcater: that's basically what we do in most cases in appserver not trying to figure what the data could be, but telling what datatype we expect (as the one requesting data) but that would (again) be quite a change in the dbdriver api, i guess... btw <_florin_> is there any IRC log available atm? for all postgresql drivers, it would be possible to figure out the correct type from the combination of analyzing the result and looking in cursor.description http://www.gnuenterprise.org/irc-logs/ <_florin_> thanks reinhard: but I think the better approach would be for the tools to tell it what to expect? s/?/./ jcater: i agree jcater: would even make it possible for the tools as I'm thinking about those embedded databases to work with databases that aren't created 100% correctly that internally store everything as string yes yes hmm exactly what i was meaning :) there's an echo in here :) that would also take care of the boolean problem the boolean problem? i.e., some databases don't have the concept of a boolean ah yes ok jcater: I'd very much like you to look at the change I've just committed ultimately, it could help alleviate some of my problems with boolean too i.e., as it stands right now appserver, et al, expect booleans to be stored as ints in databases that don't have booleans but I have a lot of historical code that expects Y/N so if I wanted to I could add a gnue.conf variable to detail how my database stores booleans and the dbdriver could know from that how to handle my non-standard setup maybe a connections.conf or, yeah instead of gnue.conf variable that'd make more sense but you get the idea well from the commit i've just made (and mentioned above) _boolean_false = '0' # value to pass for boolean FALSE _boolean_true = '1' # value to pass for boolean TRUE :) jcater: i'd *really* appreciate if you looked at it as i think it will let you get an idea about how i was thinking to do this parameter stuff I'm looking now and how i think it will probably *add* flexibility hmm at first this scared me where you search for %(...)s as what if a string somehow contained that but, that shouldn't be the case ever jcater: could be a good point but then again we don't put string literals in the statement we put them in the parameters so as long as the %( doesn't appear in a field name, it won't occur but you know... I wonder if it wouldn't be just as efficient (and possibly cleaner) to create a class to build these statements ParamQMark.add('select foo from bar where ') ParamQMark.addBinding('foo') err, well ParamQMark.add('select foo from bar where field1 = ') ParamQMark.addBinding('foo') * jcater is thinking out loud I think I'm ok with the %( )s search as I don't see how it could ever interfere though I suppose it is possible (but unlikely) in conditionals jcater: i like the easy way to build sql statements this way whats %() in python? a named substitution ok. thanks. jcater: we also pass the conditional literals in parameters that is a typical statement would look like always? except when they are none even if a GCConst is specified at least that would be the plan yes becuase the GCConst can be a string that has to be quoted correctly the main reason why i'm wanting to do this is to let the DBSIG2 driver do the correct quoting of strings and (if possible) the correct formatting of date/time values did you ever try to enter "Rock\n Roll" in a form? :) sigh what all did I miss? you volunteered to rewrite the datasources rock on! hey, wait didn't I write them once they *you* took them away from me and redid them so this sounds like its now your problem /msg jamest don't worry... I think we've tricked reinhard into doing it jcater: you shouldn't joke about such a thing ;-) /msg a sucker is born every minute check this out http://florin.bnv-bamberg.de/tree-shot.jpg _florin_'s been busy :) _florin_: what is the tag? I'm looking at that and can't figure it out from the screenshot <_florin_> it's not yet implemented. <_florin_> i intend to have one table to save my basic tree layout <_florin_> and other tables which actually have nothing to do with the tree structure itself but actually hold the information i wish to see. <_florin_> so that information, which doesn't spawn a new sub-tree... is basically a leaf :-) so a leaf is one entry in a tree ? ok and they tie to std datasources so leaf is more or less the equivalent of our master-detail? ? <_florin_> actually a leaf it's a node which "promisses" to have only last-node entries... <_florin_> jcater: yes, it has something of master/detail, but it's not quite the same. <_florin_> example: <_florin_> what would i need a tree for? let's say i want to have all my company's expenses in a tree. <_florin_> i could group them the way i wish to. <_florin_> like: 'employees'->'janitors'->'Laura','John' <_florin_> 'employees' and 'janitors' are part of the tree. they appear in the table describing the tree <_florin_> but unlike 'emplyees' (which leads to an entry inside the same table, 'janitors') 'janitors' leads to entries in an other table (the 'personal'-table or whatever you would like to call it) <_florin_> is it getting clearer? yes and no I see what you're doing but am not clear on why this isn't master-detail <_florin_> maybe this helps: it's the table the tree is built from: (btw, I'm not criticising... just trying to understand) <_florin_> mysql> select * from prodtype; <_florin_> +----+--------------+-----------+------------+---------+ <_florin_> | id | description | parent_id | info_table | info_id | <_florin_> +----+--------------+-----------+------------+---------+ <_florin_> | 1 | parent one | 0 | NULL | NULL | <_florin_> | 2 | parent two | 0 | NULL | NULL | <_florin_> | 3 | parent three | 0 | NULL | NULL | <_florin_> | 4 | parent four | 0 | NULL | NULL | <_florin_> | 5 | parent six | 0 | NULL | NULL | <_florin_> | 6 | child one 1 | 1 | NULL | NULL | <_florin_> | 7 | child one 2 | 1 | NULL | NULL | <_florin_> | 8 | child two 1 | 2 | NULL | NULL | <_florin_> | 9 | child two 2 | 2 | NULL | NULL | <_florin_> | 10 | child two 3 | 2 | NULL | NULL | <_florin_> | 11 | f.u.b.a.r. | 5 | NULL | NULL | <_florin_> | 12 | the people | 0 | person | 3 | <_florin_> | 13 | the bucks | 0 | currency | 2 | <_florin_> +----+--------------+-----------+------------+---------+ <_florin_> (forget the column 'info_id' for now... :-) sorry to interrupt guess what gConfig ('param') returns for a boolean config entry that is set to false? rue? true? True ? Ture? no 'o' err '0' a string gack that in python evaluates to True" right but I've used booleans before * jcater wonders when that changed _florin_: can we see the whole gfd or is anything covered by the forms instance <_florin_> yes. should i sent it to irc or put it on line? _florin_: I still don't understand how leaf isn't just a child block online if you can that'd be great <_florin_> ok, try http://florin.bnv-bamberg.de/tree1.gfd <_florin_> jcater: it probably is... i probably misunderstood this master/detail thing. _florin_: basically your master block is your table _florin_: this is very interesting w/master-detail, when you have a new current record in the master block the detail block(s) are requeried based on a defined primary key that links to the master block/table <_florin_> yes, but master/detail assumes that i always link to the _same_ table and to _one_ record jcater: would tree's have that structure though ok, fair enough jamest: well, I imagine the tree would always have a "current" record <_florin_> i'm trying to link to different tables, and possibly more that one record... which would correspond to a node in the tree <_florin_> hm... good point. <_florin_> good idea, actually :-) but master-detail won't handle pulling from a different table based on value of the master record but I'm having a hard time imagining how that'd work with or without master/detail or tree/node makes my head hurt :) <_florin_> well: for now the tree is read-only. <_florin_> and it doesn't do anything else besides from pointing to other records... seems like master/detail w/ some creative table structures could allow for a fairly complex tree to be built possibly using only 1 or 2 datasources? well, that is what I was getting at originally <_florin_> to put it straigt: unlike master/detail, no constraints from master appply to the 'detail' but I'm wondering how often this example would happen *** sjc has quit IRC versus in the master/detail tree case i.e., would that not be better served with an on-new-record trigger on the master block/tree well, the nice thing is this is all gobj based it would seem i.e., I'm wondering how you're going to describe these complex trees with xml so i imagine a base level could work in a couple different ways I'm envisioning that a is to a what an is to a or maybe I should say I'm envisioning that a is to a what an is to a i.e., a way to visualize a block on screen <_florin_> kinda, yes... lacking the 'parent_id' field, you're actually right. _florin_: well, a specialized view of the block not necessarily a general view <_florin_> (because without the parent_id, a 'tree' is a 'list' -- which is the visualisation of a block...) I say that because I want to add some other "block" representations to later on <_florin_> i was quessing quite a while whether to use datasources or blocks for the tree's DB opertions <_florin_> seems like block is a good idea after all... :-) *************************************** note to all please svn up and set "useParameters = 1" under [common] in your gnue.conf and try to insert, update, and delete records and tell me if you have issues especially please try with different databases thanks *************************************** *** dsmith has quit IRC <_florin_> s/quess/guess forms question: can I add a button to a block, so when I set rows=10 of the block, so the button also gets presented 10 times? at one point you could then at one point you couldn't should be able to set rows=10 on the button but I think you can now designer does not have the rows option for the button. * SachaS uses heavily designer, as designer know pretty well which options I have :) ok. will try to edit source of .gfd button tag is in page tag .... added rows="20" to button tag.: gnue.common.definitions.GParser.MarkupError: Error processing