Announcing AppleScriptable Cocoa classes for Xojo
Though it uses the Cocoa layer for AppleScript (instead of the low-level AppleEvents API), these classes are even more powerful over those for Objective C because they (optionally) use Introspection to make your Xojo classes properties AppleScript-accessible.
Another ability (independent of making your app scriptable) is that you can invoke an AppleScript’s various handlers (functions) individually - something that Xojo’s own AppleScript calling does not allow (there, you can only call the main run handler).
To use these classes, you will have to learn how to write a scripting dictionary (.sdef), though, and I won’t teach you that. The project comes with a complex demo showing off all its abilities, though, and if you’re smart enough, you can deduct all the functionaliry, including how the sdef works, from it.
Once you have understood how this works (basically, you make your data classes subclasses of “Scriptable.ObjectProxy” or you write proxy classes that mediate between the script calls and your existing data model), it’ll be very easy and quick to add new scripting accessors.
Note that this code is currently not free. It’s open source, and while you may play with it to explore the capabilities, you must contact me to get permission to use it in software that you plan to release to others. I think of making it available for free and charge for support, but I haven’t made up my mind, yet. It all depends on how much interest and need exists for this at all.