Thanks, I found the article. That would make tracking triggers easier. One thing however, in the routine, you have
notriggers = dcount(triggers,@fm) for trigno = 1 to notriggers trigger = triggers(trigno) call @trigger(...,newid,newrec,oldid,oldrec,...) next trigno Just curious, since with this routine, you effectively can have a trigger run as many triggers as needed, but, what I see as a problem, is if the 2nd trigger routine modifies NewREC, it will overwrite any modifications that the first trigger may have made to NewREC (assuming a BEFORE trigger). I guess you could assign a temp varible to oldrec, then for each iteration make oldrec = newrec, but then each successive trigger wouldn't have the original data to go by. George > -----Original Message----- > From: [email protected] [mailto:u2-users- > [email protected]] On Behalf Of Brian Leach > Sent: Monday, July 13, 2009 3:24 PM > To: 'U2 Users List' > Subject: Re: [U2] which files have triggers > > Hi George > > I wrote about this in one of the back issues of Spectrum (you can > download > these from www.intl-spectrum.com). > > I use a master trigger that reads a list of sub-triggers based on the > file > name. Okay it's an extra read, but it's worth it: the list of sub- > triggers > (which have the same calling arguments) are all called using regular > Call @ > syntax; and it allows you to swap in and out sub-triggers without > having to > drop the main trigger, log everyone off, and recreate it. Since I first > wrote that for a 24x7x365 site, that wasn't an option. > > Also, because UniVerse caches subroutines in memory, it means that when > you > recompile any changes you want to change the name e.g. MySubTrigger.1, > MySubTrigger.2 and so forth. Then change the name in the sub-trigger > list(s) > when you are sure you've tested it. > > Brian > _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
