Subj : Re: Mulit dimensional arrays To : netscape.public.mozilla.jseng From : "Jochen Stier" Date : Tue Mar 02 2004 10:25 am Yup, that is exactly my question. Thanks... I have read that multidimensional arrays are not possible in javascript, so I think you would have to create some kind of workaround. The first [] would have to be a JS_GetProperty and the second [] a JS_SetProperty. I guess one could just create some kind of dummy object that encapsulates a float*, i.e. a column of the matrix, and return that from the JS_GetProperty call. I was wondering if there is a better way of doing that, because setting all of the fields in a matrix will result in a lot of calls ! Cheers Jochen "Andreas Podgurski" wrote in message news:c22hct$8mn$01$1@news.t-online.com... > >> I am trying to make a 3D transformation matrix SbMatrix available in > >> javascript, > >> so that I can use it like > > >> var lMatrix = new SbMatrix(); > >> > >> lMatrix[0][1] = 12; > >> lMatrix[1][1] = 12; > >> . > >> > >> Is there any way to have use JS_GetProperty for that ? > > What do you mean by "that", exactly? > I think he wants to know, whether he may call JS_GetProperty directly on > [0][1] to read the value=12 in C or if it works differently. I would > think that calling JS_GetProperty on lMatrix would result in returing a > proxy object, referencing to the second dimension, which has to be > accessed with another JS_GetProperty on that proxy. Am I wrong with it? > I'm looking forward this problem, too, and it would be nice, if someone > could comment on this... > > Thanks in advance, > Andreas "SunSailor" Podgurski .