← board

Prove the tkinter surface against a real application

Why this is a separate ticket, not a doubt about the last one

The façade (lib/pcl/tkinter.pas, 2453 lines) works, and as of f1caa44fb three .npy examples run under Xvfb with diffed output, so callbacks, traces, canvas drawing and widget paths are all genuinely asserted.

What that does not establish is breadth. The examples exercise the constructs someone wrote an example for — which is the same self-selection problem [[feature-nilpy-thirdparty-libraries-as-targets]] is built around: code written here can unconsciously avoid what the façade does not support.

The forcing target, and the specific surface

songformatter's GUI (see [[feature-demo-songformatter-pxx-target]]), because it is a real application nobody wrote to fit this façade. The surface its preview path needs, from the parent ticket's own list:

Method — do NOT just read the unit

Compile and RUN, under Xvfb, and diff against CPython's own tkinter where the value is observable (font metrics are numbers: CPython is a real oracle for measure/descent, and the repo already has a tkhtmlview oracle-diff doing exactly this). A declared method that returns a wrong number is the failure mode to expect here — the same class as the parent ticket's real finding, where everything compiled and nothing ran.

Extend examples/tk/ and the Xvfb block the parent ticket added, rather than starting a new harness.

Gate

The new cases run under Xvfb with diffed output, tools/gate.sh quick green, and — for anything with a numeric answer — agreement with CPython's tkinter rather than with a recorded snapshot of our own output.

Keep the "can it fail?" check the parent ticket used: corrupt an expected file once and confirm the recipe exits nonzero. A GUI test that cannot fail is worse than none.