JESS: jess and JDBC

2005-03-02 Thread sivan k
Hello. I am trying to write and application in Jess using JDBC to connect to a MySQL database. I am not sure how todefine a java object like Connection and Statement in Jess as in the java statements: Connection con = null; Statement stmt = null; Would it work to write (defglobal ?*con* = (new

Re: JESS: jess and JDBC

2005-03-02 Thread ejfried
I think sivan k wrote: I am not sure how to define a java object like Connection and Statement in Jess as in the java statements: Connection con = null; Statement stmt = null; Would it work to write (defglobal ?*con* = (new Connection); (bind ?*con* nil) (defglobal ?*stmt* =

Re: JESS: Backward Chaining within Modules

2005-03-02 Thread ejfried
I think Mitch Christensen wrote: I have a question regarding backward chaining and the use of modules. According to JIA, If, when the rule engine is reset, there are no matches for this pattern, the code asserts a (goal-seeking) fact into working memory... But what if the need for such a

JESS: JessDE suggestion: Comment Selection

2005-03-02 Thread Mitch Christensen
Just a thought. It would be handy to be able to select a block of code and have the JessDE Editor automatically comment out that section (and vice-versa). -Mitch To unsubscribe, send the words 'unsubscribe jess-users [EMAIL

Re: JESS: jess and JDBC

2005-03-02 Thread Peter Lin
you really should write a function to do this and make it more generic. doing a line for line translation from java to JESS isn't desirable. write a custom function that implements the UserFunction interface and put your jdbc code in there. peter On Wed, 2 Mar 2005 05:45:25 -0800 (PST), sivan

Re: JESS: JessDE suggestion: Comment Selection

2005-03-02 Thread ejfried
I think Mitch Christensen wrote: Just a thought. It would be handy to be able to select a block of code and have the JessDE Editor automatically comment out that section (and vice-versa). Already in there! See the slightly faulty Toggle Comment item under the Source menu.

RE: JESS: JessDE suggestion: Comment Selection

2005-03-02 Thread Mitch Christensen
Awesome! Sorry for overlooking this. ...but I couldn't quite find a way to map a key sequence to it. Using Windows-Preferences-Workbench-Keys I was able to find the Category 'Source', Name 'Toggle Comment' but I couldn't find a 'When' value that allowed me to map a key to this command. Is this

JESS: Using 'unique' in pattern definition

2005-03-02 Thread Mitch Christensen
I found the following snippet while searching the archive for information on profiling/performance. (defrule example-4 ;; Find the pairs of buttons such that one's label is one greater ;; then the other (button (text ?t1)) (unique (button (text ?t2=(str-cat (+ (integer ?t1) 1) =

Re: JESS: Using 'unique' in pattern definition

2005-03-02 Thread ejfried
I think Mitch Christensen wrote: I don't recognize the 'unique' statement. I don't find 'unique' in the JIA index or in appendix A. I also didn't find any mention of it in the Jess Function List in the 7.0a5 documentation. The unique conditional element is now unimplemented. It parses in

Re: JESS: JessDE suggestion: Comment Selection

2005-03-02 Thread ejfried
I think Mitch Christensen wrote: Awesome! Sorry for overlooking this. ...but I couldn't quite find a way to map a key sequence to it. Probably not possible right now. Should be straightened out eventually. - Ernest Friedman-Hill