Once a PlatformFunction has been created, it can be called using call, callWith:, callWith:with:, and so on. The number of arguments in the call must match the number of arguments in the PlatformFunction.For example, to call the MessageBox function described above, you might use the following statement:The call to a PlatformFunction can fail and cause a walkback for the following reasons:The number of parameters in the PlatformFunction is not the same as the number of parameters in the call.The parameter could not be converted because its class is invalid (for example, trying to pass a Float in an int32 parameter). All such type conversions must be done explicitly (for example, pass the Float truncated as the parameter).There is insufficient memory to allocate a LargeInteger for the return value of the function.Calling a PlatformFunction with invalid arguments may result in a system crash. You need to ensure the validity of the arguments.
|