:newcoordsはアドレス渡し
coordinatesのメソッド :newcoords はアドレス渡しなので要注意
1.jskrbeusgl$ setq a (make-coords)
#<coordinates #x9a50a10="" 0.0="">
2.jskrbeusgl$ setq b (make-coords)
#<coordinates #x9a50a94="" 0.0="">
3.jskrbeusgl$ send b :newcoords a
#<coordinates #x9a50a94="" 0.0="">
4.jskrbeusgl$ send b :rotate pi/2 :x
#<coordinates #x9a50a94="" 0.0="" 1.571="">
5.jskrbeusgl$ a
#<coordinates #x9a50a10="" 0.0="" 1.571=""></coordinates></coordinates></coordinates></coordinates></coordinates>
coordinatesでは:replece-coordsを使うとコピーされる。casdaded-coordsには実装がないので、使わない方が無難。
cascaded-coordsに:replace-coordsを実装して、
:newcoords -> 参照渡し
:replace-coords -> コピー渡し というようにしてはどうかと思います。
Index: l/coordinates.l
===================================================================
--- l/coordinates.l (リビジョン 629)
+++ l/coordinates.l (作業コピー)
@@ -361,6 +361,9 @@
(send-super :newcoords c p)
(send self :changed)
self)
+ (:replace-rot (r) (prog1 (send-super :replace-rot r) (send self :changed)))
+ (:replace-pos (p) (prog1 (send-super :replace-pos) (send self :changed)))
+ (:replace-coords (c &optional p) (prog1 (send-super :replace-coords c p) (send self :changed)))
(:changed ()
(unless changed ;Is this the first change?
(setf changed t) ;Then, propagate changed signal.
いいですね.マニュアルも直しましょうか.
は
の間違いかな
またマニュアル修正体制も整ったので案をください.