How to put Max objects instantiated with Java into arrays ?

May 24, 2012 at 5:26pm

How to put Max objects instantiated with Java into arrays ?

Hi there,

intuitively, I tried this:

JitterObject[] arrayObject

which totally failed…

I missed something here (too)
I didn’t find how to solve this by myself.

#59885
May 25, 2012 at 11:17am

I’m not sure I understand your question.

Shouldn’t it be someething like:

JitterObject arr[] = new JitterObject[100];

for ( int index = 0; index < arr.length; index++ )
{
arr[index] = new JitterObject( “jit.op” );
}

// Then you decide what you are going to do with 100 jit.ops.

#215601
May 25, 2012 at 11:25am

you answered and pointed me to that UGLY syntax error while I declared my array …
many thanks to you :)

(ps: 100 jit.ops are a bunch :)

#215602
May 25, 2012 at 11:38am

You can have either:

JitterObject[] arr = new JitterObject[100];

or:

JitterObject arr[] = new JitterObject[100];

I don’t like that syntactic variability, but it does save you a few characters of typing if you want to declare a whole lot of arrays.

#215603
May 25, 2012 at 11:45am

oh .. ok.
so my ugly bug wasn’t there.

To be honest, I built something with JS.
This is just to experiment things, in this VERY early prototype.

(your guru’s advices around this post would be more than appreciated :) )

#215604
May 25, 2012 at 11:57am

I haven’t used the jit.gl objects yet. I did see your previous post but I don’t think I have sufficiently reliable advice to offer in response to that question. Sorry.

#215605
May 25, 2012 at 11:58am

Okay Ross.
Someone else would answer maybe.

Many thanks for your help

#215606
May 25, 2012 at 12:01pm

I do hope to play around with the jit.gl objects driven by Java. In Adobe Flash I very much like using actionscript to easily produce detailed highly abstract animations. It will be possible to do similar things with jit.gl objects, but in 3D. However it’s one of those things I haven’t gotten around to yet.

#215607

You must be logged in to reply to this topic.