SOLVED dlgitem_set() and subsequent queries of set controls?
Ok, this makes me happy.
I do not agree that this is correct behavior, BUT I now believe I have a reliable method for dlgitem_sets and _gets. And by that I mean, I don't use _sets with checkboxes. Because they don't work correctly. In my opinion. (I am not sure yet whether this is true of other types of controls.)
The following code samples half work. They update the visual display of the XUI dialog but do not fully set the VALUE attribute of the item so that subsequent _gets find the box checked:
To be clear, if you look at the XUI checkbox id="production_current" with your eyes, you will see a check. If you programmatically _get that item with either dlgitem_get or dlgitem_get_value, you will find it is not checked.
The following _set code will, however, TRULY set the check box:
junk = oid_modify_attr($junkarr, "checked", 'true'); Now if you programmatically _get that item using either dlgitem_get or dlgitem_get_value, you will find it IS checked.
I would love someone to validate or refute this or isolate cases where it is true. Fully open to some subtlety I'm not seeing, but I have been beating on a patch of code proving this, at least in my XUI and ACL (maybe a Windows reboot will screw it all up 😉