Jess will try to defeat your efforts, here, unfortunately. Usually
Jess is calling Java code that doesn't know about Jess types, so
generally it tries to convert multifields into Java arrays. If $?c has
members of a uniform type -- all Strings, for instance -- then
newContent can be of type String[]. If the objects are heterogeneous,
then you might have to play a trick: for example, write a Userfunction
and call that to create the wareHouse object. The Userfunction will
get the unchanged multifield as a jess.ValueVector, and can do
whatever it wants with it.


I think wqyivy wrote:
> hello,
> I want to know which type the value of a mutlslot is when I transmit it to java? For 
>example, I define a class named wareHouse.
> 
> (deftemplate box (slot location) (multislot content))
> (defrule r1
> (box (location ?l) (content $?c))
> =>
> (bind ?t (new wareHouse $?c)))
> 
> In the class wareHouse's constructor, 
> public wareHouse(? newContent){...}
> which type should I use to specify the parameter newContent?
> 
> Thanks for taking your time.
> Ivy
> 
> 
> 
> 
> 
> -----------------------------------------
> �ҵ��������ҵ�����
> http://name.etang.com/
> ���ƶ��ţ���������ʱ�й���
> http://sms.etang.com
> ��׬200Ԫ�����ѵľ���
> http://ecard.etang.com/progt/index.asp?s1=1&s2=1
> ְҵ��˼¼
> http://topic.etang.com/job/index.htm        
> 
> ---------------------------------------------------------------------
> 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