Hot Door CORE Forum

Full Version: pass-through SDK function access
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Would it be practical to add a pass-through function to classes to allow access to SDK functions that don't have an explicit interface in the CORE header, as a simple alternative to building a hybrid project to access a few simple functions?

For example, hdicoreDocument.h offers activate() const while the underlying AIDocumentList.h has (*Activate)( AIDocumentHandle document, ASBoolean bSetFocus ); I'd like to use CORE to get the relevant DocumentHandle(s) and, for example, Activate with bSetFocus set to false, access the dictionary, the modified state, file path, or other document criteria without bringing that window frontmost (don't want to frighten users with screens suddenly flashing). I would imagine that our IDE's autocomplete would help show a list of available options as well as the Adobe SDK itself so a simple boilerplate disclaimer may suffice for documentation.
In a strongly-typed language there is no reasonable way to do this; you would need to know the types that the underlying SDK function accepts, in which order, and hence need the true function declaration. At that point, you basically have a "hybrid" hdi_core and Ai SDK project.

In this case, if you need the argument for AIDocumentSuite::Activate() exposed, I'll try to get it into the next release of the lib.
Thanks, Garrett. I was sure it'd be a long shot, but a killer class if it could work.

At this point, I don't personally need additional document class functions since I've already gone the hybrid route, but it may be helpful for others since, at least in the SDK, some functions work correctly only when the document is active. If you do update hdicoreDocument, I suspect others could use functions to retrieve properties such as modified, or the file's path and display name.