I am in the middle of a project using Java and Jess [beginner at both]
so I have asked many questions and each time I have received a clear
explaination of a solution. I need help again. I have to create an
object that requires two points [JAVA CODE shown below]. I have been
able to create the two points [Verified by Screen Output information
below] and create the Pair object but cannot update the two Points in
the object. My JESS Code is show after the JAVA code for Pair. Is there
something I am missing?
Thanks in advance
Jeff Ruff
<<<<<<<JAVA CODE>>>>>>>>>>>>>>>
public class Pair implements Serializable
{
public Point xy1, xy2;
public Pair()
{
xy1 = new Point(0, 0);
xy2 = new Point(0, 0);
}
public Pair( Pair pair)
{
this(pair.xy1.x, pair.xy1.y, pair.xy2.x, pair.xy2.y);
}
<<<<<<<<<<<<<<<<<JESS CODE>>>>>>>>>>>>>>>>>>>>>>>>
(bind ?x1 (integer (format nil "%.0f" (str-cat "-" (/ ?top-pad 2)))))
(bind ?x2 (integer (format nil "%.0f" (/ ?top-pad 2 ))))
(bind ?y1 (integer (format nil "%.0f" (str-cat "-" (/ ?top-pad 2)))))
(bind ?y2 (integer (format nil "%.0f" (/ ?top-pad 2))))
(bind ?pt1 (new java.awt.Point))
(bind ?pt2 (new java.awt.Point))
(set-member ?pt1 x ?x1)
(set-member ?pt1 y ?y1)
(set-member ?pt2 x ?x2)
(set-member ?pt2 y ?y2)
(printout t "Creating pair content" crlf)
(bind ?dPair (new com.chipdata.jdbutils.Pair))
(printout t "Integer values found " ?x1 " " ?y1 " " ?x2 " " ?y2 " Points
Created " (str-cat "" ?pt1) " " (str-cat "" ?pt2) crlf)
(printout t "Check values of BBox " (str-cat ?dPair) crlf)
(set-member ?dPair xy1 ?pt1)
(set-member ?dPair xy2 ?pt2)
<<<<<<<<<<<<<<<<Screen Output>>>>>>>>>>>>>>>>>>>>
Creating pair content
Integer values found -810000 -810000 810000 810000 Points Created
java.awt.Point
[x=-810000,y=-810000] java.awt.Point[x=810000,y=810000]
Check values of BBox [(0,0),(0,0)]
--------------------------------------------------------------------
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]
--------------------------------------------------------------------