This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > July 2005 > String -> MFString





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author String -> MFString
nunomartins01

2005-06-30, 7:22 am

Hi

I'm trying to change a object texure, but the instruction
textura.setValue(im01);
doesn't work...

The setValue worked well with float to SFColor, but not with String to
MFString...

How can i associate a Sring to a MFString??


private void Clicar(java.awt.event.MouseEvent evt) {

textField1.setText("Textura Mudada");
mat = mainScene.getNamedNode("MAT");
textura = (MFString) mat.getField("url");
String im01 = "im.jpg";
textura.setValue(im01); <----- error
}

Tnaks

Nuno

Rex Melton

2005-06-30, 8:06 pm


Try:

textura.setValue( new String[]{ im01 } );

nunomartins01 wrote:

> Hi
>
> I'm trying to change a object texure, but the instruction
> textura.setValue(im01);
> doesn't work...
>
> The setValue worked well with float to SFColor, but not with String to
> MFString...
>
> How can i associate a Sring to a MFString??
>
> private void Clicar(java.awt.event.MouseEvent evt) {
>
> textField1.setText("Textura Mudada");
> mat = mainScene.getNamedNode("MAT");
> textura = (MFString) mat.getField("url");
> String im01 = "im.jpg";
> textura.setValue(im01); <----- error
> }
>
> Tnaks
>
> Nuno


O.L.

2005-07-01, 8:24 am

nunomartins01 a pensé très fort :
> String im01 = "im.jpg";
> textura.setValue(im01); <----- error


Try :

MFString im01 = new MFString("im.jpg");
textura.setValue(im01);

Bye
O.L.

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews