mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-24 10:46:50 -06:00
Double-clicking a workbook, Open With, dropping on the Dock icon and `open -a GridCraft book.xlsx` send the app a kAEOpenDocuments Apple event instead of command-line paths. winit 0.30 doesn't handle it, so AppKit answered "GridCraft cannot open files in the Excel Workbook format". Register the handler with the audited fmv-macos-events crate that PdfCraft and PhotoCraft already use: it does the Objective-C interop (unsafe, which this workspace forbids) behind a safe main-thread API and leaves winit's delegate alone. Opened paths go through SheetApp::open_path; a quit event closes the window. The registration lives in main() until the event loop returns, so the event that launched the app is caught too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>