Title: Still a problem when trying to match an object in an object...
Hello,
Some time ago, I asked about that question (August 30).
You replied but I didnt get it to work, so I wrote:
I have the following rule:
(defrule ASP1
(OrmedContext
(readyToRun TRUE)
(task script)
I'm running into a strange problem when inserting a DefaultMutableTreeNode
object into my engine. I define the shadow fact, create a new instance and try
to create a fact and it fails. But if I run definstance again, the fact is
inserted successfully! What the heck is going on to exhibit
I think Alexander Lamb wrote:
(OrmedContext
(readyToRun TRUE)
(task script)
(selectedCompleterResponse ?r :(eq ASP get ?r keyCode))
(OBJECT ?x)
...
The problem is that my LHS never evaluates to true
Sure -- the call of eq is asking whether the string
I think pgilli1 wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
I'm running into a strange problem when inserting a DefaultMutableTreeNode
object into my engine. I define the shadow fact, create a new instance and try
to create a fact and it fails.
It actually *doesn't* fail
Title: Re: JESS: Still a problem when trying to match an object in an object... More info
Some more info on my previous question:
The crash happens exactly here:
defaultOrmedContext = new OrmedContext();
defaultOrmedContext.setTask(completer);
rete =
Title: Re: JESS: Still a problem when trying to match an object in an object... Even more info
Well,
To find an answer, I tried to simplify the problem.
So I wrote:
(defrule ASP1
(OrmedContext
(readyToRun TRUE)
(task script)
(selectedCompleterResponse ?r)
(OBJECT ?x)
)
=
(printout t ?r crlf)
Of course, the official way to do this is to use BeanInfo
objects. This is how you tell the JavaBeans machinery what is a
property and what is not. You can write a java.beans.BeanInfo object
to exclude the troublesome method, and Jess will use it. You really
need to get the JavaBeans spec from
I think Alexander Lamb wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
Some more info on my previous question:
You need to find out the class of the object in ?r. Change your rule
like this:
(selectedCompleterResponse ?r:(progn
Title: Re: JESS: Still a problem when trying to match an object in an object...
More info
Is the rule defined in the engine BEFORE
the defclass?
Richard Long Imagination is more
important than knowledge.
Senior Developer
Gestalt LLC
12605 Challenger, Suite 160, Orlando,
I think Alexander Lamb wrote:
Well, I still crash in the definstance:
ERROR IN DEFINSTANCE: Jess reported an error in routine
DefinstanceList.createFact.
Message: Called method threw an exception.
at jess.DefinstanceList.createFact(DefinstanceList.java:119)
at
I didn't know Jess looks for BeanInfo objects. I'll give it a go.
This might be a good item for the FAQ and/or user manual.
Thanks!
alan
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 03, 2002 9:29 AM
To: [EMAIL PROTECTED]
Subject:
I think Alan Moore wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
I didn't know Jess looks for BeanInfo objects. I'll give it a go.
This might be a good item for the FAQ and/or user manual.
It's mentioned in the chenge log :)
Seriously, yes, that's an excellent suggestion.
12 matches
Mail list logo