Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!munnari.oz.au!bruce!merlin!paulg From: paulg@bhpmrl.oz.au (Paul Gallagher) Newsgroups: comp.databases Subject: Re: dbase IV "popup" while editing data with "read" command Keywords: dbase, data entry Message-ID: <1991Apr17.110913.7460@bhpmrl.oz.au> Date: 17 Apr 91 11:09:13 GMT References: <881@imec.UUCP> <1991Apr5.164724.4798@dbase.A-T.COM> <1991Apr5.165347.4981@dbase.A-T.COM> Sender: usenet@bhpmrl.oz.au (USEnet nntp account) Organization: BHP Research - Melbourne Laboratories, AUSTRALIA Lines: 73 I want to mention a few BUTs, IFs and F***s regarding this admittadly brilliant capability of dBase IV. I'm currently working on a couple of projects that implement nested READs via VALIDation UDFs - the general scenario is: - read GETs - use VALID clause to call UDF which: - checks user input match with "lookup" database - if exact match, fill in mvar - if partial match, activate picklist (as described in prior messages) - if no match, ask user whether picklist or new entry - if new entry, activate new window and appropriate @... I've nested this procedure up to three times, but in doing so, I had to overcome some of the most frustrating, depressing, infuriating (etc) problems I've ever seen. Here's how it went: some time ago I implemented this procedure with one level of nesting and thought "Wow, this is great!". Two weeks ago I did my first implementation with two levels of nesting - you know, cut-and-paste code etc. Disturbingly, on return from either of the VALIDation UDFs up popped an "Unknown command code" error message (not trapped by the debugger of course - are A-T living in this century do you think?) After hours of code reconstruction, line-by-line - a process which is not exactly fast especially since I am only using a 10MHz XT - I found that by selectively commenting out MESSAGE clauses to the @..SAY..GETS involved I could at a whim generate any one of the following error messages on return from the UDFs : "Unknown command code", "Not a character expression" and "Not a numeric expression". By removing all MESSAGE clauses, I could dispense with the errors completely. So, (allbeit without MESSAGES) I finally had the thing running. I've yet to speak to A-T about this, but my best guess is that dBase IV (V1.1 btw) was either having stack problems or perhaps not managing a lack of memory properly, or even not managing it's own internal memory allocation properly. All I can say is that our local A-T help line is damned lucky it doen't operate at 2am else they would have had one hell of an earbashing! Now I've tempted fate (what are users for?) and tried nesting three levels deep. The error message is different again of course (who ever heard of systemmatic bugs!?!). Now the UDFs return .F. even though the returned variable is _DEFINITELY_ .T. - even the "debugger" says so! BUT, this error is not a cert. - sometimes the procedure works when following the same steps from scratch. I've yet to resolve this problem. On the bright side, I've probably got some of the most consistent, well documented, standards-based code now after working through it umpteen times to make sure the bugs weren't my fault. PS: I've recently returned to dBase programming after a 12 month hiatus. I remember back then, after grappling with the dBase IV V1.0 bug involving array assignation using macro substitution (which chewed up memory like nothing else - and never spat it out), that I swore I'd never touch dBase again, but if I did _always_ assume the bug's in dbase, not your code(!), lest you wish to waste hour after frustrating hour. Nothing dulls the memory like time of course. Thanks for the shoulder to cry on. I'd like to hear other's experiences along these lines though. Is this a problem someone else out there has had? Paul Gallagher /\/\ Paul Gallagher, PC Support Officer, / / /\ Computer Systems Group, / / / \ BHP Melbourne Research Laboratories / / / /\ \ 245 Wellington Rd Mulgrave Vic 3170 AUSTRALIA \ \/ / / / Phone : +61-3-560-7066, Fax : +61-3-561-6709 \ / / / ACSnet : paulg@bhpmrl.OZ.AU \/\/\/