Uh oh. I think this might be an instance of the 'advice turned off during execution of advice' feature/misfeature referred to in the message:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg06647.html Hmmm. I suppose I could write my own batch user-function that does this. Is there a better/easier way? -Mitch FWIW, I'm trying to load rules from a location defined by a java system property. For instance, I would like to do the following: C:\data > java jess.Main -Dapp.rules.dir=C:\app\server\rules Then I would like (batch) to read files relative to the app.rules.dir property value. This allows me to separate my rules from my data files (which reside under C:\data). I was intending on using 'before advice' in (batch) to prepend the parameter value with the contents of the 'app.rules.dir' system property. -----Original Message----- From: Mitch Christensen [mailto:[EMAIL PROTECTED] Sent: Monday, September 13, 2004 1:55 PM To: Jess Mailing List ([EMAIL PROTECTED]) Subject: Help with (defadvice) Hey, I'm attempting to add before 'advice' to the (batch) function to do some path manipulation tricks. I'm experiencing the following strange behavior: Jess> (defadvice before batch (printout t "before batch advice" crlf)) TRUE Jess> (batch main.clp) before batch advice Hello from main.clp Hello from second.clp Jess> The 'main.clp' file is defined as follows: (printout t "Hello from main.clp" crlf) (batch second.clp) and 'second.clp' contains simply: (printout t "Hello from main.clp" crlf) As you can see, for some reason the batch 'advice' doesn't get executed when (batch) is called from within 'main.clp'. I'm going to start poking at the source code, but I thought if someone might be able to point out something obvious, it might save me some time. Thanks in advance. -Mitch -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
