Closed ronzo99 closed 3 years ago
unpackAsQDPoint crashes at: let point: Rect = descriptor.data.withUnsafeBytes { buffer in buffer.bindMemory(to: Rect.self)[0]
The fix is to replace "Rect" with "Point" at two places in that line.
This can be tested by targeting Finder, which uses a point for its "desktop position" folder property:
let finder = Finder() print("TEST: get desktop position of folder \"TEMP\"") print(try finder.folders["TEMP"].desktopPosition.get()) // [2301, 554]
Thanks for being thorough. Careless copy-paste error on my part. Fixed in AppleEvents rev e72f117.
AppleEvents
unpackAsQDPoint crashes at: let point: Rect = descriptor.data.withUnsafeBytes { buffer in buffer.bindMemory(to: Rect.self)[0]
The fix is to replace "Rect" with "Point" at two places in that line.
This can be tested by targeting Finder, which uses a point for its "desktop position" folder property:
let finder = Finder() print("TEST: get desktop position of folder \"TEMP\"") print(try finder.folders["TEMP"].desktopPosition.get()) // [2301, 554]