mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-21 03:26:50 +00:00
Saving writes the selected button's /PCOn, else its /Opt entry, else its state name (radio_dataset_value). Opening read the data as an /Opt export value first, so with /PCOn items 4 1 next to /Opt [(1) (2)] the second button saved 1 and reopened as the first, whose /Opt entry is 1, and taking the XFA out compared against that reading. radio_state_for_item now inverts the writer: the button whose written item equals the data. Data no button writes (from another viewer) is read as before, as an export value, then a state name. The widget walk is shared with the writer. Test (fails with the reader as before: the second button reopens as ["0"]): the /PCOn 4 1 fixture saves 1 for the second button and 4 for the first, each reopens on the clicked button and strips with no lost data note; data 2 and 0 from elsewhere still select /1 and /0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv