*** wendall911 has quit IRC *** holycow has quit IRC *** pipio has quit IRC *** reinhard has joined #gnuenterprise *** btami has joined #gnuenterprise good morning good morning *** sjc has joined #gnuenterprise *** kilo has joined #gnuenterprise good morning good bye ;-) off to customer *** johannesV has joined #gnuenterprise johannesV: is it 'safe' now to use gacvs? kilo, you mean in production ? not really, but i have been using gnue-appserver lately, because you were to disassemble it... semi-production thx * btami suggested this "semi" :) semmi means nothing in Hungarian... :) well, actually it should work, but i'd say you better test everything :) anyway, i'm about to "re-implement" dirty reads again :) kilo, is the problem you've mentioned still there with latest svn ? will try now *** booyaa has joined #gnuenterprise johannesV: it does not work, but i did not expect it to... in fact sweeping through the commit mail i did not see any changes relevant fr this problem so i need some better information about the problem then yes, here it comes i have luvly little classes, two properties cannot be null well, acutally what has changed is Object.py always returning None for non-ref-properties i have two instances of this luvly class in the db and these properties are not null of course can you send me a gcd ? but one has a property (that CAN be null) filled up with numbers, the other one's is null of course i will send, but it is rather complex just cut out the classes in question and i do a for cycle on all these instances, and if this 3rd property is null, i fill it up but when i try to commit it, it says that a non-nullable property is null... which class is this ? line 6 60 tipus and jogviszony are not nullable, ok. ok and then comes line 179 ha where i set haviAdo if it is null you do know we have *no* dirty reads atm, do you ? anyway why should these be dirty? you use this procedure (which is a method of a Szamfejtes) to iterate over instances of Szamfejtes ... but, ok well, you do another find () this find only returns what has been commited to the database-backend first when do you call this procedure ? hmm, but haviAdo might be null ... * johannesV is really confused now ... (as kilo has said before) these two instances come from the db, where they are in proper state. nothing is changed on them before that line 179. so imho they are not dirty ah, ok kilo, if you put a print in the iteration for szf in szamfejtesek: print "szf:", szf.gnue_id just to see wether it get's executed ... and you're sure there is *always* an instance returned by this find () ? not sure if always, but sure now in the test db ok kilo, when was it last working ? yes, print shows both gnue-ids ok what does the haviAdo-print say ? i mean, has it been changed ? it was working on 18-01-2005 no, 19-01-2005 that's tomorrow :) yes, i know 8-))) haviAdo print is showing the right value, whic should be stored. but on the calling form there comes commit(), and i get 'None is not blablala for property PAYROLL_tipus' does the exception contain something about classnames ? i mean, do you know in which class the null-violation occurs ? so can you add a print of Payroll_tipus to the procedure then ? sure hm, or in other words, can you add both properties, tipus and jogviszony to the prefetchlist of the find changing and testing gcd files is slow... yes, on firebird it's slow *** booyaa has quit IRC the print shows it contains the right value, so it is filled up trying now to add both non-null fields to the prefetchlist ok btw yesterday i tried with empty prefetchlist, and it did not work that way no success now neither so if both fields are in the prefetch-list it's the same shit ? hm, seems like i have to create a similair test-case here yes, shows the same which instance of Szamfejtes is loaded to call the procedure ? ah, kilo i think i've got it i was sure... ok, can you apply the following change to geasInstance: Index: geasInstance.py =================================================================== --- geasInstance.py (Revision 6909) +++ geasInstance.py (Arbeitskopie) @@ -375,7 +375,7 @@ if not prop.isCalculated: if prop.gnue_nullable is not None and not prop.gnue_nullable: value = self.__record.getField (prop.column) - if value is None: + if value is None or isinstance (value, Object.NullObject): raise PropertyValueError, (prop.fullName, None) sure, trying hmm, same behaviour hmm, i though i was sure i assume you have restarted the appserver, so i need to dig deeper yes, i restarted yeah, if i think it over the problem arises on the tipus property (which isn't a ref) damn, if i could reproduce it here, it would be much easier to debug will it be of help if i zip up the whole app and send it over to you? you mean including data (gsd) maybe yes or the fdb file (you do have firebird) *** mnemoc has quit IRC well, but firebird's very slow (on my site) ok, then i will produce a gsd also *** mnemoc has joined #gnuenterprise gnue-gsdgen working... kilo, is the instance you call the procedure from, already dirty at that time when you do the call ? imho it should not be ok, got it will set it up now ok, comment out the gsscvs part in setup-db.sh, and use the full.gsd ok everything's loaded appserver's up and running ah, ok. start form szamfejt1.gfd which form do i use to check ? szamfejtes1.gfd ok, what do i have to do ? enter 2005, then 2, Kiss József, and select the only one possibily from the last dropdown ok then push Eloleg i get a question then 14400.0 press any button, then here comes the sun lalalala ok great you got it? no, but now i can dig into it Kiss József is like John Smith hmm, but this form creates a "new" record of PAYROLL_Szamfejtes doesn't it ? why? because it's the block you're editing ? it's quite difficult since there are all these hungarian names ... :) not harder than hotline in german... 8-)) and for the currently edited record the field "tipus" is empty kilo, that's for sure *lol* but i want did not change that record, only those 2 that are already existing * johannesV is again confused but kilo why do you use a bound block then ? because i have bad bad memories from free blocks in Invoice... if i enter 2005 into the first field, i have modified a 'blank' record of PAYROLL_Szamfejtes set it's field PAYROLL_ev to 2005 well, but this way you *do* make a record in szamfejtes dirty, and it has *no* tipus field value set so the 'bug' is actually no bug or do i miss completely now ? * kilo is confused now ok fine so we're both confused now ... can't i commit that bloody instance from within the procedure? ok, it works for me * johannesV runs for a cup of coffee first ... Hooray, you can calculate Hungarian monthly personal tax advance then! 8-)) well, i don't know what all that fields mean ... :) ok, the problem is as i've mentioned before: by entering all that values into the form you are changing the 'empty but new' record in the block "blk". now you call the procedure on this instance which has to store that 'empty but new' record to the appserver-backend. now it is dirty from pov of appserver, and it does *not* have a valid field "tipus" already set (because it's not included in you form) so you say it should be a free block then the procedure runs through quite fine, but does *not* find the 'empty but new' record just stored, because appserver has *no* dirty reads atm well and once back in the form, the commit () *has* to fail, because tipus of the empty but new record really *is* null kilo, yes, either use a free block or do a query first kilo, one problem in using an unbound block is: you cannot use the 'call' function :( however, i still would push my idea that find() should have another parameter: find_dirty with possible values [all, no_dirty, only_dirty], default value set to 'all'... so i think you'd have to do it with a bound block, and a query just before (like dts.createResultSet ()) ah yes, i remember now, that was the reason i did not use the unbound block but that's an obvious restriction, isn't it ... :) i started to write the form with an unbound block, then in trigger code i realized i needed a block to call procedures kilo, you need a combination of it one block to catch the data from the user, and another one to perform the procedure call no, i need a collection of islay malt whiskies what i don't like in this concept (at first sight) is, that an instance-method behaves like a class-method. well, in gnue we cannot differentiate between them for example: you could iterate over PAYROLL_Szamfejtes in forms (using firstRecord/nextRecord) and call the procedure per Record so you don't need that additional find () in the procedure. this would also make the procedure a instance-method again (i think) but you're right, appserver has no concept of 'global' procedures or class-methods (right now) that would put business logic into forms and in this case, to calculate advance tax for a given month, you need data from the previous months ok, so you could do something completely differen different add a class to the module which is just used to hold such procedures in fact in this moment i favor using dts.createResultSet() hmmm, what do i earn with that? so you won't have a procedure PAYROLL_Szamfejtes.PAYROLL_szamfejt1 but for example "PAYROLL_foobar.PAYROLL_szamfejt1" and put up a block for that class? and in your form you have a block to payroll_foobar (with prequery=Y) and to blkFoobar.call (Payroll_szamfejt1) ... i see, kinda 'interface' class... right hmmm, good though s/though/thought ...who had nearly fought the Dragon of Angnor, who had nearly stood up to the vicious Chicken of Bristol, and who had personally wet himself at the Battle of Badon Hill... you would use an unbound block for data-input, and another one for the interface-class i think you even won't have to have a record in the interface class block why do i feel it is all hacking? :) kilo, you can do something completely different ... :9 add an unbound block for data-input lol leave the procedures as they are but you will also need a block to PAYROLL_Szamfejtes, which will do the actuall call in fact i still think about this 'interface' class this saves you from changing the procedure (although i still dislikes the procedures stile) s/dislikes/dislike/ s/stile/style/ damn, my english's very bad today s/me/young_kilo * johannesV thinks maybe not only today *lol* ok, so i can start working on dirty reads now, since this problem is not a bug in appserver no, we have to find someone first who is to blame derek hmm, i also would vote for him. blame derek i don't know derek, but he must be a really busy guy ... if he's to be blamed for such a lot of things yeah he's even logged in twice derek and dneighbo rotfl *lol* johannesV: thx anyway, /me is very confused now kilo, have a drink then .... :) btw what does post() and commit() exactly do when called from a procedure? johannesV: great idea, but who will drive home then? ah, kilo, i haven't thought of that, since i'm working at home .... :( how do you access post () and commit () from within a procedure ? you can call session.commit () in a procedure to force a commit of all pending changes in current session (including validation and the like) well maybe my question was not exact, how should one use them? but you cannot do a post ? data get's stored to appserver whenever you call a procedure, or call the block's update () function or whenever you change a property of an instance within a procedure well, the last isn't exactly correct but the point is, you don't have an explicit post () function around, do you ? well, maybe not 8-)) what you have to keep in mind is the concept of transactions. this is the level one can confirm or cancel lalalala appserver devguide lalalala... 8-))) for the logs I would not recommend calling commit () manually in a procedure it might be counter-intuitive to the user the user might expect his changes to be not committed until he presses that fancy disk icon on his form but if you have a form without that fancy icon, but other buttons, i would be intuitive imho yes ok, then we agree but then it's the decision of the form to call commit, not of the procedure right does that matter? I mean the procedure should still not call commit because it then would be a procedure that only behaves correctly from a form without icons (if you understand what i mean ) ah, i see *** sjc has quit IRC reinhard: can you give a good example on 'why are modules needed'? (these questions are always dangerous, because one can answer them with 'no') yes ;-) but not now as I must run for lunch :( ttyl ls ok err back why are modules needed modules define a namespace e.g. we have a customer object you write hungarian invoicing and in hungary every customer has a 12 digit tax number (hypothetical) so you define a new field "taxno" I write an austrian invoicing and in austria every customer has a (hypothetical) 6 char tax number so i define a new field "taxno" our modules would be incomaptible *if not* we had the module system that makes your field e.g. "invhu_taxno" and mine "invat_taxno" does that answer your question? he is quite hard to convince... reinhard: i understand this, but it violates the main db design principles if hu_taxno != au_taxno by meaning why we (you in au and me in hu) want to use the same name for different main if there is a main, centralised meta-database everyone should know if there is a taxno exist, and what it it means if he wants to add another, but not exacly the same, he has to chose another name i think i don't belive there is a good system can be developed with independently developed packages i learned there is only ONE database exist in one information system and it hase to be planned carefully i'm sorry to bringing this questions time to time, i'm not against modules, just sometimes i'm looking into .gcd files and they are hard to read a bit :) * btami just thinking loud btami: i think i don't belive there is a good system can be developed with independently developed packages i think it can. cooperation is needed though if there are a few rules that are followed reinhard: s/system/database system yes, cooperation is the most important in designe time, so packages can't be independently developed :) http://www.gnu.org/software/gnue/project/docs/DevelopersIntroduction/c31.html not sure if you have ever read that text it's old (from the prehistoric times of gnue) but in fact exactly this text was what caught my interest in gnue and made me join the project (the text wasn't written by me, but by jamest) and ever since then it was my desire to reach the basic principles described there * btami is reading it... * johannesV is reading too lol btw this version seems to be slightly updated as it already mentions "developers from austria" but I can clearly remember reading very much of this text already back in 1998 baaahhh im I old!!! s/im/am/ hmm is modules just for another layer of abstraction just for eliminating namespace collisions ? *** dcmwai has quit IRC am i right? that's one of it's main purposes also of course there are modules to define what can be installed or left away with still keeping a working system can you explain this a bit more? ok there are people that might need payroll and there are people that don't if we have a module named "payroll" (or something to that effect) it makes it easy for the user to see what he needs to install isnt that a package? instead of just having classes and the user has to install the employee class, the payroll class, etc we have always regarded the package as a "useful combination of modules" if you compare to debian, a module == a .deb, and a package == a task more or less so yes payroll was a bad example ok, i understand but it's "only" a packaging issue not related to namespace thingy yes we solved both issues by defining the module system yes i like modules as level of packaging, but don't you feel any bad when you have to use full references in procedure code, and thy are too..., hmm, overcomplicated? you only have to use full references when you reference stuff outside your own module and I don't feel all too bad with that, no :) like this: self.product.SALES_vat.TAX_vatFromNet hmm, in fact nowdays i like to use fully qualified names even inside modules ok, it's not as bad :) johannesV: does it affect performance: if i do a find(), only test the length of the returned list, then qualifying only gnue_id in find()'s last argument. is it worth, or should i not care about it and put an empty list there? *** jamest_ has joined #gnuenterprise kilo, it depends on how you do check the length of a list x = find (...) a) if x: ... b) if len (x): .... b ok, b) would affect performance if there are calcualted fields in the condition/sort better is always doing the first reinhard: anyhow, thx for your patience... btami: np so if only gnue_id is put in the cache list (4th argument), is it quicker? doing len (x) would mean that appserver might have to fetch all rows in order to know the length of the result kilo: in this case it does not differ kilo: no need to put gnue_id in the cache list hmm it's there implicitly if cache list is empty, does it fetch all fields? no can't say it does not differ, i'd say doing len (x) is always a bit slower it does only fetch gnue_id so [] equals ['gnue_id']? yes great. i thought [] would fetch all fields llalalalalala appserver devguide lalalalalalala you would probably never want to fetch all fields because I could go and extend your class by a char(32767) field which is always full with a lot of text and suddenly *your* procedure would become much slower :) who knows. 10 yrs ago you would have said mankind will never send a sonde to a cold moon behing Jupiter... kilo: sure? you never seen 2001 space odyssee? :) that is a film. films arent always true. (except of course, the Search for the Holy Grail) and if x: is quicker than if len(x): ? yes if x: doesn't try to get the length of the list but only tests wheter it is empty or non-empty ok, thx hi, how do i secure appserver? not start it 8-))) does it work? mnemoc: depends on what kind of security you are after admin vs. user separation? version 0.6 user access is not there yet after kilo's i guess firewall & vpn-s are the only way to keep it safe of external crackers yes xmlrpc should be tunnelable through ssh also yes, that is the right choice is 0.6 too far away? but never tried it myself nearer than the hurd ;) tunneling xmlrpc? whoaaa there is any work to do it trough apache? don't know, not really my special field of knowledge ... mod_appserver or something like that ;) hmm, what gains would it mean? to use apache cache and security btw * kilo is happy that mnemoc succeeded with appserver current roadmap: security = 0.5 reinhard: damn, i missed it kilo: thanks :) @roulette kilo: *click* @roulette btami: *click* @roulette *BANG* Hey, who put a blank in here?! * bigbrother` reloads and spins the chambers. :( mnemoc: well, keep trying 8-))) kilo: you wouldn't say that with *real* russian roulette :) kilo: mnemoc is our man :) how can i keep trying if i'm dead? you're not dead, it was a blank anyway, you can buy lifes from me. 6 lives cost one whisky for kilo j/k :D OT: how can i add a reference (foreign key) on a GCD? mnemoc: what are you trying to use appserver for? to run procedure and stuff there and not on my old-crappy-workstations but not giving all the job to the not-that-old-server i see am i wrong trying appserver to do that? no, it is a good idea what do you mean 'referencing on a GCD'? foreign keys a field(s) point to another class pointing* just use the classname as the field type fully referenced (i.e. module_class) http://www.gnuenterprise.org/tools/appserver/docs/manual/devguide/References.html#References :-P aha (people are always complaining that the devguide is still incomplete....) like in sample.gcd :) :p i missread it and see our great wiki on appserver howtos OT: how hard can be to add ncurses output to navigator? not too hard AFAICT for the time being you might also try the "text" ui *** wendall911 has joined #gnuenterprise text != curses? to erm no text is even more primitive oh, fits me then 8-))) lol :) *** kilo has quit IRC *** jamest_ has left #gnuenterprise if i set type to module_class, what ID will it use? a unique index i should set or some internal value? gnue_id is always the primary key it's implicitly there in every class ic, thanks :) *** titopbs has joined #gnuenterprise *** johannesV_ has joined #gnuenterprise *** titopbs has quit IRC *** johannesV has quit IRC *** titopbs has joined #gnuenterprise *** jamest_ has joined #gnuenterprise *** lxf has joined #gnuenterprise *** lxf has quit IRC *** kitchen has joined #gnuenterprise is there an ETA to the gnue website being polished? in particular, I'm looking for the status on the packages *** sjc has joined #gnuenterprise kitchen: I think none of the packages is usable in production environments I had been assuming as much l8r all *** reinhard has left #gnuenterprise *** titopbs has quit IRC *** btami has quit IRC *** titopbs has joined #gnuenterprise *** dcmwai has joined #gnuenterprise * dcmwai is away: I'm busy *** johannesV_ has quit IRC *** btami has joined #gnuenterprise *** johannesV has joined #gnuenterprise *** kitchen has quit IRC *** NeB{wRk} has joined #gnuenterprise *poke* anybody awake? yes, but heading out the door in a couple of minutes just curious if anyone in here would be familiar with the dcl proect i saw a link to this group from their page I'm only a little familiar with it, haven't really used it ok, its a specific question.. thanks anyway thought i'd give it a shot in here ;) ok :) *** NeB{wRk} has quit IRC *** NeB{wRk} has joined #gnuenterprise darn disconnects so what type of software are you guys involved with? *** NeB{wRk} has quit IRC *** titopbs_ has joined #gnuenterprise *** SachaS has joined #gnuenterprise *** johannesV has quit IRC *** btami has quit IRC *** titopbs has quit IRC *** kilo has joined #gnuenterprise *** reinhard has joined #gnuenterprise *** dimas has quit IRC *** jamest_ has left #gnuenterprise hi kilo hi reinhard reinhard: do you have a hotel for brussels? staying in the same place as last year? hi SachaS good night *** SachaS has quit IRC *** kilo has quit IRC *** ccfiel has joined #gnuenterprise hello ppl! night all *** reinhard has left #gnuenterprise *** jcater has quit IRC *** sjc has quit IRC *** ccfiel has quit IRC *** dcmwai_ has joined #gnuenterprise *** wendall911 has joined #gnuenterprise *** titopbs_ has quit IRC *** booyaa has joined #gnuenterprise *** wendall_away has quit IRC *** booyaa has quit IRC *** dcmwai has quit IRC *** dcmwai has joined #gnuenterprise *** wayneg has joined #gnuenterprise *** wendall911 has quit IRC *** wayneg has left #gnuenterprise *** dcmwai has quit IRC *** dcmwai has joined #gnuenterprise *** dcmwai has quit IRC *** dcmwai__ has joined #gnuenterprise *** dcmwai has quit IRC *** dcmwai has joined #gnuenterprise