Finished ‘The Chaos Machine’ by Max Fisher.
Next #book to read: ‘Enshittification’ by Cory Doctorow.



I am using `NSTextAttachment` to embed an interactive SwiftUI view as a `NSHostingView` inside `NSTextView`. It's really powerful but I also find it so difficult to work with. Especially when needing to share states/updates between the `HostingView` and the `NSTextView` (which is the outer Markdown editor that the code block is embedded into).
Codex seems to have finally found a semi-working solution to the height calculation problem. At least it works when I open the MD file, close it and reopen, then I can add more lines in code block and the editor will correctly update its height to accommodate the growing code block.
However, if I just open the MD file immediately after having started the app, then begin adding more lines, it will not tell AppKit's `NSTextView` about the height changes leading to overlapping issues. #dev #macOS
View quoted note →


This dialog asks the user if they want to use the existing image/video file or duplicate.
#dev #macOS #Swift #SwiftUI #AppKit