Post

Replies

Boosts

Views

Activity

Comment on UndoManager — how to deal with it?
Any action: drag, add, delete... But only first. Start program, do something, Undo... Crash. Start program, do something, do something, Undo, Undo... crash. Thread 1: EXC_BAD_ACCESS (code=1, address=0x1699bf8020c0)... Adding  undoManager?.setActionName("add Point") changes nothing.
Jul ’21
Comment on SwiftUI App has disabled keyboard shortcuts on MacOS.
Hm, You have partially right ;) System added buttons work, but Delete button — which is custom — doesn't. """ struct MyApp: App {     var body: some Scene {         DocumentGroup(newDocument: { MyDocument() }) { group in             ContentView(document: group.document)                 .navigationSubtitle(group.document.name)         }         .commands {             CommandGroup(replacing: CommandGroupPlacement.pasteboard) {                 Button("Delete") {                     deleteSelectedObject.send()                 }                 .keyboardShortcut(.delete, modifiers: [])             }         } ...     } } """
Jan ’22