Hi,

Good question. There's no way, but simply because I never needed it
and didn't realize anyone else might.

There are some subtleties here. There's a difference between the
"value of a Defglobal object" and the value of a defglobal in a given
context. A Defglobal might hold a function-call object, and evaluating
this function may very well give you a different value than that held
by the associated Rete objects's global context (since the Defglobal
holds the value used to reinitialize the global, not the current
value.) 

You could add this function to Defglobal to get access to the
reinitialiationvalue:

public Value getValue() { return m_binding.m_val; }

You can get the current value from the Rete object using

Rete r;
Defglobal dg;
Value v = r.getGlobalContext().getVariable(dg.getName());


I think [EMAIL PROTECTED] wrote:
> 
>      Hi,
>      
>      Is there a way to get a value from Defglobal or I need to parse 
>      whatever returned by Defglobal.toString() myself?
>      
>      Thanks,
>      
>      Alex
> 
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
> 
> 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

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