This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: how to access elements of java array?
On Fri, Dec 16, 2005 at 09:16:58AM -0500, Dominique Boucher wrote:
> Victor,
>
> To access Java array elements, use the primitive-array-get form:
>
> (let* ((doc-parts (invoke
> (as <org.outerj.daisy.repository.Parts>
> (invoke doc 'getParts))
> 'getArray)))
>
> ((primitive-array-get <org.outerj.daisy.repository.Part>) doc-parts 0))
>
> Cheers!
>
> Dominique Boucher
It works (((: thank you
I have defined two convenience functions:
(define parts-length
(lambda (parts)
((primitive-array-length
<org.outerj.daisy.repository.Part>)
parts)))
(define parts-get
(lambda (parts k)
((primitive-array-get
<org.outerj.daisy.repository.Part>)
parts k)))
to access that array
With best regards,
--
Victor Anyakin () ascii ribbon campaign
/\ - against html mail