[cells-devel] Problem with defmd and dependency ...
Frank Goenninger
frgo at mac.com
Wed Aug 29 19:50:00 UTC 2007
Correct problem case:
I defined the foreign-ptr cell as lazy (as :until-asked) for a
reason ... ->
0> 7612 calculating cell ~a appears in call stack: ~a dirty=0/
foreign-ptr/gnc-point0] dirty=0/foreign-ptr/gnc-point0]
(dirty=0/foreign-ptr/gnc-point0])
... landing in a (break) ...
Ok. So I am basically looking for an idiom on how to avoid the
circularity. I sense there is a simple solution but ...
Oh my. It's been a long day ;-)
Frank
Am 29.08.2007 um 21:35 schrieb Frank Goenninger:
> * PGP Signed: 08/29/07 at 21:35:14
>
> Hi Kenny (and all on the list):
>
> I have a simple defmd:
>
> (defmd gnc-point ()
> (x (c-in 0))
> (y (c-in 0))
> (z (c-in 0))
> (foreign-ptr (c_? (let ((ptr (or (^foreign-ptr) (fgn-alloc 'glInt
> 3 :gnc-point))))
> (when ptr
> (setf (eltgli ptr 0) (^x))
> (setf (eltgli ptr 1) (^y))
> (setf (eltgli ptr 2) (^z)))
> ptr))))
>
>
> This is a model for a point ( x | y | z ) and a foreign object
> pointer. The pointer shall be set to a an FFI memory pointer (via
> CFFI) when the instance is created. Also, the elements of the
> memory array (which is 3 glInt, this being three OpenGL Integers)
> shall be updated when any of the coordinates x y z is changed...
>
> I get x, y, and z updated but the foreign-ptr remains NIL ... What
> am I doing wrong ???
>
> Thx!
>
> Frank
>
>
> * Frank Goenninger<frgo at mac.com>
> * 0xED320F02:0x05AE0907
> _______________________________________________
> cells-devel site list
> cells-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/cells-devel
>
>
> * PGP Signed: 08/29/07 at 21:35:14
> * text/plain body
> * Frank Goenninger<frgo at mac.com>
> * 0xED320F02:0x05AE0907
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cells-devel/attachments/20070829/a5431e41/attachment.sig>
More information about the cells-devel
mailing list