Hi Hal,

> I'm using this to define my print options:
> 
>       PropertyValue[] printOpts = new PropertyValue[2];
>       printOpts[0] = new PropertyValue();
>       printOpts[0].Name = "Name";
>       printOpts[0].Value = sPrinter;
>       printOpts[1] = new PropertyValue();
>       printOpts[1].Name = "Wait";
>       printOpts[1].Value = "true";
> 
> Originally I set the array length to 1 and not 2 and the last 3 lines 
> are new.  If I break it down into two different PropertyValue[] 
> objects, will setting the 2nd erase the first?

No, for you are setting a different value.

>  When using it as above, 
> I get an error:
> 
> com.sun.star.lang.IllegalArgumentException: 

So the argument is used in a wrong way:

>       printOpts[1].Name = "Wait";
>       printOpts[1].Value = "true";

You set a string as the value, but a Boolean object is expected:

printOpts[1].Name = "Wait";
printOpts[1].Value = new Boolean(true);

Greetings, Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to