You didn't provide sample code so I am making assumptions here...

I think that you are running across a change made in the latest releases.

Using:

?factId <- (pattern)

is now more like:

?factObject <- (pattern)

since the matched facts for a pattern are now full fledged facts (someone
please correct me if I am wrong here.)

>From section 2.8.1.2 in the user's manual:

Note that ?fact is a jess.Value object of type RU.FACT, not an integer. It
is basically a reference to a jess.Fact object. You can convert an ordinary
number into a FACT using the fact-id function. You can convert a FACT into
an integer when necessary by using reflection to call the Fact.getFactId()
function. The jess.Value.externalAddressValue() method can be called on a
FACT Value to obtain the actual jess.Fact object from Java code. In Jess
code, a fact-id essentially is a jess.Fact, and you can call jess.Fact
methods on a fact-id directly: 

Also, see section 4.2.1.4 in the user's manual:

The class jess.FactIDValue
Use this subclass of Value when you want to create a Value that represents a
fact-id. The one constructor looks like this: 
  public FactIDValue(Fact f) throws JessException 

In previous versions of Jess, fact-id's were more like integers; now they
are really references to facts. As such, a fact-id must represent a valid
jess.Fact object. Call externalAddressValue(Context) to get the jess.Fact
object, and call Fact.getFactId() to get the fact-id as an integer. This
latter manipulation will now rarely, if ever, be necessary. 

Good luck!

alan


-----Original Message-----
From: Matthias Blankenhaus [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 6:14 PM
To: [EMAIL PROTECTED]
Subject: JESS: modify


Hi all !

Since Jess6x the modify language primitive does not work any more the way
it used to work.  When I specify a fact-id complaints about the fact-id
and reports that it is not an external address ?

I must have missed some major changes :-(


Matthias



---------------------------------------------------------------------
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]
---------------------------------------------------------------------

---------------------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to