JESS: GUI

2005-11-14 Thread [EXTERN] Manuel Kollmuß








HI



is it possible to add pictures (*.jpg, *.gif etc) to a GUI?



Thanks

M.K.








Re: JESS: GUI

2005-11-14 Thread Jason Morris
I think that M.K. wrote:
 is it possible to add pictures (*.jpg, *.gif etc) to a GUI?

If you mean a Jess GUI (like in Jess In Action), then certainly.  You
can build any Java GUI you want -- Jess places no limitations on you. 
Any decent book on Java AWT or Swing will show you how to do this.

If you have more questions of this type, you might want to first try
directing them to

http://www.javaranch.com

They have many forums that deal with specific Java topics like GUI basics.
Cheers,

-JM

-
Morris Technical Solutions LLC
www.morristechnicalsolutions.com
[EMAIL PROTECTED]
phone/fax: 503.692.1088



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]




Re: JESS: Accessing the Java object behind a shadow fact in a

2005-11-14 Thread Jason Morris
-- Forwarded message --
From: Jason Morris [EMAIL PROTECTED]
Date: Nov 14, 2005 11:19 AM
Subject: Re: BOUNCE jess-users@sandia.gov: Approval required:
To: [EMAIL PROTECTED] [EMAIL PROTECTED]


I think that Erich Oliphant wrote:
 I see the methods that flag shadow facts but nothing to get at the actual 
 object.

Each shadow fact has a slot called OBJECT which is a handle to the
underlying Java object.  Simply get that slot value and you have
your reference.

Let's say that you have a JavaBean that has a field like so:

public class ShadowFoo {
private String name;

   // with the typical getters and setters:

   public String getName() {
  return name;
   }

   public void setName(String name) {
   this.name = name;
   }
}

Now, let's say that you have a rule that looks for a shadow fact of
this type (assuming that you've definstanced it correctly):

(defrule find shadow-foo
  (MAIN::shadow-foo  (OBJECT ?obj))
=
  (printout t The name of this object is:  (get ?obj name) crlf)
  (printout t This works too!:  (?obj getName) crlf)

You bind the OBJECT slot to a variable in the pattern, and then use
the variable on the right hand side of the rule.  See pg. 90 of Jess
In Action for another perspective.

Cheers,
Jason

-
Morris Technical Solutions LLC
www.morristechnicalsolutions.com
[EMAIL PROTECTED]
phone/fax: 503.692.1088


--
-
Morris Technical Solutions LLC
www.morristechnicalsolutions.com
[EMAIL PROTECTED]
phone/fax: 503.692.1088



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]




Re: JESS: Accessing the Java object behind a shadow fact in a userfunction

2005-11-14 Thread Roger Studner
Get from the slot OBJECT.

something like (bind ?obj (fact-slot-value ?fact OBJECT))

I could be wrong :)



On 11/14/05, erich.oliphant [EMAIL PROTECTED] wrote:

 Hi,
 I am implementing a convienenice userfunction that takes a bound shadow
 fact
 as an argument and returns some of it's deeply nested data. The argument
 to
 the userfunction is of course a jess.Fact. I can't quite figure out how to
 get a reference to the underlying Java object from the docs. I see the
 methods that flag shadow facts but nothing to get at the actual object.

 Any help would get greatly appreciated. Thanks

 
 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]

JESS: defquery

2005-11-14 Thread Roger Studner
I am trying to do some 'counting'.

I make a defquery to return a fact. I get back the Iterator.. i retreive the token.. I get the fact.

When I try to modify the fact.. I get an error that 'the fact is not in working memory'.

I mean, I even asserted the fact before using it. I just don't
want to match on it on the LHS for obvious reasons (circular firing).

Thanks,
Roger S