High Sierra problem with NSRects

(Shane Stanley) #1

There’s a problem with the latest beta of 10.13 where AppleScriptObjC methods that return NSRects are returning lists — {{0.0, 0.0}, {100.0, 100.0} — instead of records — {origin:{x:0.0, y:0.0}, |size|:{width:100.0, height:100.0}}. This is most likely to hit Xcode-based projects, but it also affects things like my Dialog Toolkit script library.

I believe the cause is something fairly simple: a change in the .bridgesupport file that defines how to treat an NSRect. Short of silliness, I’m optimistic it will be fixed before official release.

In the meantime, I’ve put together a small framework that can be added to projects and scripts to patch the issue. It should get anyone facing the issue now through until a fix is available, and if the worst happens and it’s not fixed, this is probably a decent longer-term approach.

If anyone wants a copy, email me or reply here. if you’re not running 10.13, it’s of no use to you.