Adding scripting support for custom records


Steve Mills
 

What's the best way to return data from a scriptable app when the property is a record-type that's declared in the sdef? It corresponds to an Objective-C class. I ended up adding a separate property to the owner class that returns the data in an NSDictionary and using that property in the sdef instead of the real property, which is the normal Objective-C class. But it feels like there should be a more simple way that I haven't been able to glean from the spotty documentation I've found so far.

I feel so dumb about this, having previously been about half responsible for implementing the AppleScript support and recordability for one of the best page layouts apps ever written back in the Carbon days.

--
Steve Mills
Drummer, Mac geek

Join cocoa@apple-dev.groups.io to automatically receive all group messages.