(Tcl) Transition from Email.CreateForward to Email.ToForward
Provides instructions for replacing deprecated CreateForward method calls with ToForward. Note: This example requires Chilkat v11.0.0 or greater.
load ./chilkat.dll
set email [new_CkEmail]
# ...
# ...
# ------------------------------------------------------------------------
# The CreateForward method is deprecated:
# emailObj is a CkEmail
set emailObj [CkEmail_CreateForward $email]
if {[CkEmail_get_LastMethodSuccess $email] == 0} then {
puts [CkEmail_lastErrorText $email]
delete_CkEmail $email
exit
}
# ...
# ...
delete_CkEmail $emailObj
# ------------------------------------------------------------------------
# Do the equivalent using ToForward.
# Your application creates a new, empty Email object which is passed
# in the last argument and filled upon success.
set emailOut [new_CkEmail]
set success [CkEmail_ToForward $email $emailOut]
if {$success == 0} then {
puts [CkEmail_lastErrorText $email]
delete_CkEmail $email
delete_CkEmail $emailOut
exit
}
delete_CkEmail $email
delete_CkEmail $emailOut
|