*** rynik has joined #gnuenterprise good morning good morning *** rynik has quit IRC *** rynik has joined #gnuenterprise *** reinhard has joined #gnuenterprise good morning all reinhard: hello *** btami has joined #gnuenterprise *** kilo_ has joined #gnuenterprise *** sjc has joined #gnuenterprise good morning *** johannesV has joined #gnuenterprise good morning good morning reinhard: 2 remaining filter question 1. if one class has a filter, why it's descendants have to contain this filter tag too, why not inherit it like all other fields 2. is there any "public" procedure to change filter on-the-fly (from a trigger)? I don't want users quit the program, if they want to work with another companys data btami: must run for meeting, will answer later and there are monthly tasks that must be run on all companies, or some selected companies so it is not only needed to change filters, but disable them from trigger code so we would need a disableFilters() and an enableFilters(filterName) morning *** johannesV_ has joined #gnuenterprise *** johannesV has quit IRC btami: regarding your questions what do you mean with "descendants"? changing filters would be possible by logging out and back into the connection (not sure if/how that could be done in a form trigger, but it could be a good feature for forms anyway to "re-login" on request) and you can at any time override the filter for a single operation by including the filter field into the query or the list of fields to update we have BILLING_Head and BILLINGHU_Head extending the former ah and the filter must be specified in the latter too really? yep that would be a bug IMHO if overriding a filter works this way that is ok for us but changing it permanently would be great still jg erm but BILLING_Head and BILLINGHU_Head are *not* the same classes ! so how do you *extend* this ? i think you'd like to have one class 'billing_head' and add some props from the billinghu *module* so the second one should be ... yes and there it shouldn't be necessary to specify filters again .. (if so it is a bug) semantically you are ok i was sloppy but the extending class requires you to define the filter ah, i was wrong too right would be: ... only in that case you are using the same class yes, exactly johannesV_: another question are unittest in common run ok for you btami, haven't tried recently, but they used to ... i get this: ====================================================================== ERROR: testAsSQL (datasources_GConditions.ConstructionTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tamas/svn/gnue/gnue-common/tests/datasources_GConditions.py", line 167, in testAsSQL (rCode, params) = self.__getAsSQL (buildCondition (self.prefix)) NameError: global name 'buildCondition' is not defined i thing common/unittest is out of date, and you should consider using common/tests johannesV_: that message seems to be from tests :) ah, i see you're using tests right but you could remove unittest it's from runAllTests from tests dir hm, looks like some of reinhard's changes break the unittest of datasource_GCondition (like having buildCondition to return a GCondition instance even for None-Type input) it would be cool to run this with all supported dbdrivers, if someone can install all of them if i fix that one in line 115 (datasource_GCondition.py) it passes all 7 tests without errors oh sorry even runAllTests passes fine i've commited a fix to the unittest for gconditions hmm, same error maybe you remove all that old pyc files ... ? btami, how do you call runAllTest? using gcvs ? old pyc files removed, then run with ./runAllTest ok, but the no gnue is in you path then ... try it with gcvs instead (if you're using svn of course) wow all OK thx for gcvs tip great ! np tip i s Hungarian... s/tip/hint *** kilo_ has quit IRC *** dcmwai has quit IRC *** holycow has quit IRC *** holycow has joined #gnuenterprise *** btami has quit IRC *** ryni1 has joined #gnuenterprise *** ryni1 has quit IRC *** ryni1 has joined #gnuenterprise *** rynik has quit IRC *** jamest has joined #gnuenterprise *** johannesV__ has joined #gnuenterprise *** johannesV_ has quit IRC *** jcater has joined #gnuenterprise Hi, the login dialog bothers me and I'm not using filters at the moment. How can I get rid of it? ryni1: you using appserver? yes what do you get asked in the login dialog? Oh, its from the sample: company and fiscal year. ah ok you have a company and a fiscal year in your db? did you import the sample data? yes if yes, you can just add to your connections.conf in [appserver] section yes, no problem logging in base_comany=demoa gl_year=2005 OK, thanks reinhard: Sorry to say, but it didnt work. Dialog still shows up. Hang on s/commany/company ryni1: does it work? *** holycow has quit IRC *** titopbs has joined #gnuenterprise *** btami has joined #gnuenterprise *** chillywilly has quit IRC *** chillywilly has joined #gnuenterprise *** lekma has quit IRC reinhard: It works. Thanks. *** wendall911 has joined #gnuenterprise *** btami has quit IRC *** johannesV__ has quit IRC *** titopbs has quit IRC *** btami has joined #gnuenterprise Hi Hi, i don't get it. I want to create a new instance of an object, asign some values and do a commit. I do: plan=new( "kontoplan_plan" ) plan.text=tmplist[1] session.commit() What is wrong? NameError: name 'new' is not defined Anyone? ryni1: first i have to say i'm not an appserver expert, but what context are you using this code? in a .gcd procedure? hi btami! I'm using it in atrigger inside a gfd I want to import data from a file so I get all this data and need to store it in different objects i think you are mixing functions providid by forms and appserver in triggers/procedures please read again the developers guide of formsandappserver grrr, my space key is on strike No hint? you want to pump some data from one db to another ? No from a file to the db trough the appserver I suppose why appserver? what kind of file ? what are you expecting the new(...) line to do? what is kontoplan_plan? ryni1: new() is a server side function ryni1: you can use it in appserver procedures but not in a form trigger can I call appserver procedures from the gfd then? yes, but that won't help you with what I understand you are trying to do you are trying to write a python script that fills appserver with data, right? yes! let me pepare a kind of sample for that I'd be honored! from gnue.appserver.language.language import App app = App.App () session = app.newSession ('user', 'password') session.new ('kontoplan_plan') err skip last line p = session.new ('kontoplan_plan') p.kontoplan_text = 'foo bar' session.commit() ------ put that in a separate python file and just run it text is a property of kontoplan_plan right fully qualified name would be kontoplan_text so you can either do session.setcontext('kontoplan') at the start so NOT p.kontoplan_plan.text= 'foo bar' no p is an instance of kontoplan_plan you can either do ah, I see p = new ('kontoplan_plan') p.kontoplan_text = "foo bar" or session.setcontext ('kontoplan') p = session.new ('plan') p.text = "foo bar" you get the idea? nifty stuff lol one of these days I'll have to try appserver jcater discovers the depths of appserver ;-) Yes, I think so. I'll try it out. Thank you! reinhard, my biggest issue is I deal almost exclusively with legacy systems *** wendall911 has left #gnuenterprise I don't really do any new projects jcater: right, that's a show stopper for appserver it's not that I don't think appserver is a good tool but one day you have to try it just for the fun of it ;-) yeah reinhard: thx for guiding ryni1 and jcater :) and me of course:) you really have to extend that dev guide... then we can point into Chapter/Paragraph xyz only :) * reinhard saw the clone wars yesterday or how star wars II is called in English I really have to visit those clone makers soon I could use some millions of clones of me and johannes ;-) maybe also of jamest, jcater, btami s/btami/jan clones of kilo would be too dangerous - the whisky world market price would rise too high ;-) star wars ii is pronouced "crap" in english lol =) yeah jan of course and not to forget psu whom I am *really* missing! reinhard, ImportError: No module named language. you run svn? then you have to run your script with gcvs to get gnue into the import path I'm running debs then it's maybe the problem that i wrote nonsense :) from gnue.appserver.language import App is the correct statement not language.language lol re "crap" how true you hear the one about how Daimler-Chrysler is pronounced in German? the Chrysler is silent. roflmao reinhard, do you mind if I post a trace back? does anybody use the unicodeMode in DataSourceWrapper in non-gnue code? I meant the unicodeMode parameter not I it's completely useless now and I would like to remove it I didn't even know there was such a flag I imagine as you usually don't care for unicode ;-) lession 1: don't let your short term hacks influence the interface of public functions or you will have a hard time getting rid of them again ... :-) ryni1: no problem usually the last few lines are enough DB000: Traceback (most recent call last): DB000: File "", line 27, in __main______gnue_forms_GFObjects_GFLayout_GFLayout_instance_at_0x4138120c____Page1_import_ON_ACTION_importTrigger DB000: File "/usr/lib/gnue/python/gnue/appserver/language/Object.py", line 159, in __setattr__ DB000: sm.store (self.__sid, self.__class, [self.objectId], [name], [[__value]]) DB000: File "/usr/lib/gnue/python/gnue/common/rpc/drivers/Base.py", line 238, in __call__ DB000: return self._adapter._runMethod (self._methodname, *args, **params) DB000: File "/usr/lib/gnue/python/gnue/common/rpc/drivers/xmlrpc/pw_xmlrpc/ClientAdapter.py", line 95, in _runMethod DB000: result = to_call (*__args, **params) DB000: File "/usr/lib/python2.3/xmlrpclib.py", line 1032, in __call__ DB000: return self.__send(self.__name, args) DB000: File "/usr/lib/python2.3/xmlrpclib.py", line 1319, in __request DB000: verbose=self.__verbose DB000: File "/usr/lib/python2.3/xmlrpclib.py", line 1073, in request DB000: headers DB000: ProtocolError: DB000: I tried to put your example inside the trigger though. yay reinhard, I don't understand the point of unicode ascii is more than enough for English it's been a long time since we've had the last 500 internal error here .... jcater: :-P ryni1: the code i gave you is meant to run as a separate script not in a form is there any point in having a form at all for what you want to do? Not more than giving me a button wich says 'Import'. reinhard: remember Python version <= 2.3.4 bug btami: aaahhh good point well but ryni1: you already have run forms with appserver ok, even with triggers, right? he is running debs sarge has python 2.3.5 Python 2.3.5 (#2, Feb 9 2005, 00:38:15) [GCC 3.3.5 (Debian 1:3.3.5-8)] on linux2 ah ryni1: first i would try to run it outside the form OK, not sure how though. But I'll manage. just save it in a file and run the fle with python night all *** btami has quit IRC *** kilo has joined #gnuenterprise reinhard, plan.kontoplan_text='foo bar' works fine butplan.kontoplan_text='foo bar' sorry, correction: but plan.kontoplan_text=templist[1] doesn't is templist[1] a string? Yes is it maybe a string containing non-ascii characters? But it contains 'รถ', is that a problem then you have to pass it as a unicode string OK make sure it is of type unicode like unicode (templist[1], 'iso-8859-1') because if it's not unicode, the server won't know which encoding it should be interpreted as Your just to kind :) Hi,hi... This is just great. Soon I will be able to import my list of accounts from my acconting program to my GNUe app. I'm just too tired to do anything productive good night all *** reinhard has quit IRC *** jamest has left #gnuenterprise *** kilo has quit IRC *** jcater has quit IRC *** titopbs has joined #gnuenterprise *** titopbs has quit IRC *** ryni1 has left #gnuenterprise *** jcater has joined #gnuenterprise *** jcater_ has joined #gnuenterprise *** jcater has quit IRC *** tiredbones has quit IRC *** jamest has joined #gnuenterprise *** jcater_ has joined #gnuenterprise *** jcater has quit IRC *** sjc has quit IRC *** holycow has joined #gnuenterprise *** holycow has quit IRC *** jamest has quit IRC *** jcater has quit IRC