Hi,

I'm trying to make a NullApplet class, similar to ConsoleApplet except
that it provides no graphical components itself, and simply assumes the
jess code will handle everything.  To do this I need to bind the address
of the applet to a jess variable, so that I can make calls in the jess
code such as

        (?*applet* add (new java.awt.Button "Push Me"))

I tried modifying the code in the README, where the variable foo is
bound to the jess variable ?*x*, resulting in


        // Define the defglobal
        m_rete.executeCommand("(defglobal ?*applet* = 0)");
 
        // Create the Funcall object
        Funcall f = new Funcall("bind", m_rete);

        // Now add the arguments, in left-to-right order. Each argument
        // is a jess.Value object. Note the use of the
        // RU.EXTERNAL_ADDRESS  type to pass in the Java object
        f.add(new Value(RU.putAtom("*applet*"), RU.VARIABLE));
        f.add(new Value(this, RU.EXTERNAL_ADDRESS));

        // Now execute the function (simpleExecute is a static 
function.)
        f.simpleExecute(f, m_rete.globalContext());


but when I run this I get the following:

Rete Exception in routine Value::externalAddressValue.
  Message: Not an external address: ?*applet* type = 8 at line 3102:  (
run )  at line 0:  ( batch "brcoat.clp" ) .

complaining that ?*applet* is a variable, not an address.  How would I
pass it as an address?

--
Alex Shinn

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to