Appendixes : Appendix B. Calling external functions using Smalltalk

Appendix B. Calling external functions using Smalltalk
As you learned in Accessing external functions, VA Smalltalk supports calling external functions by using objects called platform functions. A platform function (an instance of class PlatformFunction) represents a function outside the VA Smalltalk environment. This chapter covers how to call external functions using VA Smalltalk Base instead of visual parts.
Generally, the process of calling an external function from VA Smalltalk Base involves the following steps:
Create a new record wrapper class (as a subclass of AbtForeignOSObject) to represent each parameter that will be passed to the external function.
Create an instance of the PlatformFunction class to represent the external function you want to call.
Use the PlatformFunction instance to call the external function, passing it the record wrapper containing the input values.
VA Smalltalk Base provides classes that enable you to perform each of these tasks.