off the top of my head -
stringClass = createObject("java" ,
"java.lang.Class").forName("java.lang.String");
Array = createObject("java", "java.lang.reflect.Array");
stringArray = Array.newInstance(stringClass, 10);
Array.set(stringArray, 0, mystring); //set first position
Enjoy,
Mark
On 6/6/06, Rod Higgins <[EMAIL PROTECTED]> wrote:
>
>
> Depending on what is returned from getServer() you might want to also change
> this line also ...
>
> ArrayList.add( myServerArray[ i ] );
>
> to
>
> ArrayList.add( myServerArray[ i ].toString() );
>
>
> ----- Original Message -----
> From: Taco Fleur
> To: [email protected]
>
> Sent: Tuesday, June 06, 2006 11:19 AM
> Subject: [cfaussie] Re: javaCast string array
>
>
> This seemed to work...
> stringServerArray = arrayNew( 1 );
> stringServerArray[ 1 ] = javaCast( "string", "www.serverone.com" );
>
>
> On 6/6/06, Taco Fleur <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > Thanks, I gave that a go, but no luck, its expecting java.lang.String[]
> > The ArrayList must not be the right data type as it can't find the method,
> the method is there!
> >
> > Following is what I have;
> >
> > try {
> > myServerArray = listToArray( getServer() );
> > ArrayList = createobject( "java", "java.util.ArrayList" );
> > for ( i = 1; i lte arrayLen( myServerArray ); i = i + 1 ) {
> > ArrayList.add( myServerArray[ i ] );
> > stringServerArray = ArrayList.toArray();
> > }
> > myObject.setServers( stringServerArray );
> > }
> >
> >
>
>
>
> --
> Taco Fleur - http://www.pacificfox.com.au
> Web Design, Web development, Graphic Design and Complete Internet Solutions
> an industry leader with commercial IT experience since 1994 …
>
> >
>
>
--
E: [EMAIL PROTECTED]
W: www.compoundtheory.com
ICQ: 3094740
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---