Hi,

> Am 17.01.2017 um 19:59 schrieb Tilman Hausherr <[email protected]>:
> 
> Here's code to create radio buttons with appearance streams:
> http://stackoverflow.com/a/41632982/535646
> 
> When calling
> 
> radioButton.setValue("a");
> 
> then the first button becomes invisible. That is because
> 
> Root/Pages/Kids/[0]/Annots/[0]/AS
> 
> has "0" instead of "a" as value, and /V is also "0", /DV is still "b".


the issue is because of the /Opt entry (which is not neccesary in this case). 
This is used to look up the index of the value and the index will then be used 
for the value.

> 
> Calling
> 
> radioButton.setValue("Off");
> 
> brings an ArrayIndexOutOfBoundsException.

this should not happen of course but again caused by the /Opt entry and the 
handling of that.

BR
Maruan

> 
> Is this a bug in our code or a wrong way to create radio buttons?
> 
> Tilman
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to