Dusan Sormaz
Tue, 02 Feb 2010 11:49:16 -0800
Yasir,Jess does not interpret string as arguments for the set method. You need to specify each argument, like in:
(call ?futureCal set (Calendar.HOUR) 8) where (Calendar.HOUR) is the jess call into static field. Dusan Sormaz Yasir Khalid wrote:
Hai There, I am having difficult time to use "Calendar" Class from Java API in jess,I am planning to use this class my simple jess script. But i just got stuck on the seting up the date detail (e.g: Year) in jess.Once I run following script on eclipse. (reset) (watch all) (import java.util.Calendar) (bind ?futureCal (Calendar.getInstance)) (call ?futureCal set "Calendar.HOUR, 8") But, i would have an error ; Jess reported an error in routine call while executing (call ?futureCal get "Calendar.HOUR, 8"). Message: No overloading of method 'get' in class java.util.GregorianCalendar I can call with these arguments: (call ?futureCal get "Calendar.HOUR, 8"). Program text: ( call ?futureCal get "Calendar.HOUR, 8" ) at line 5 in file /home/jess/workspace/HelloWorld/src/HelloWorld.clp.It is saying the 'get' method is not under GreogorianCalendar class, but if i am referring to this <http://java.sun.com/j2se/1.4.2/docs/api/java/util/GregorianCalendar.html> , it is already inherited form 'Calendar' class.Any suggestion about above error? Thanks for the attention -- - Yasir -
-- *************************************************** * Dusan Sormaz, PhD, Associate Professor * Ohio University * Department of Industrial and Systems Engineering * 284 Stocker Center, Athens, OH 45701-2979* phone: (740) 593-1545 * fax: (740) 593-0778 * e-mail: sor...@ohio.edu * url: http://www.ent.ohiou.edu/~sormaz
*************************************************** -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users y...@address.com' in the BODY of a message to majord...@sandia.gov, NOT to the list (use your own address!) List problems? Notify owner-jess-us...@sandia.gov. --------------------------------------------------------------------