Expand my Community achievements bar.

.presence kills .access on radio buttons

Avatar

Former Community Member
I have found a wierd bug where if you attempt to change the presence of an object (any object) and also the access of a radio button group at the same time, the radio button group access isn't updated.



eg:

if (CheckBox1.rawValue == 0) {

xfa.resolveNode("form1.p1.TextField1").presence = "hidden";

xfa.resolveNode("form1.p1.RadioButtonList").access = "protected";



} else {

xfa.resolveNode("form1.p1.TextField1").presence = "visible";

xfa.resolveNode("form1.p1.RadioButtonList").access = "open";



};



if you comment out the lines referancing TextField1 it work just fine for the radio buttons.



Has anyone else noticed this?

Is there any way to get around this? I've tried almost everything.



I'm using Designer v7.0, downloaded the trial for v7.1 and it did the same.



can use my demo PDF to test http://PaulandNat.com/testcalc.pdf



TIA



Paul
2 Replies

Avatar

Former Community Member
Paul,



I concur with your assesment that .presence prevents the .access = "open" to work.



The workaround is to apply an xfa.layout.relayout() after the .access = "open";



I changed the JS on your example pdf to:



if (this.rawValue == 1) {

RadioButtonList.access = "open";

xfa.layout.relayout();

TextField1.presence = "visible";



}



I place it on the "click" event of CheckBox1. It works!



Rick Kuhlmann

Tech-Pro

Avatar

Former Community Member
Thanks Rick!



tried your suggestion in the real form and it's working great.



Hopefully Adobe will update this in the layout engine of future releases so more people don't end up having the same issues I did.



Paul