If you want to follow .NET programming style for custom event, the input parameters are normally System.Object and System.EventArgs (or derived class). I know you can add the a HANDLE property to the derived System.EventArgs and assign it with the static temp-table handle, but this forces the event handler to process the temp-table in dynamic mode. Is there a preferred way of passing along static temp-table when publishing an event?
You can add a method which takes a static temp-table. Something to consider here is that you're making a deep copy every time you do this (unless you pass BY-REFERENCE).
You could also wrap the TT in a class, and set that wrapper class as a property. Single deep copy here, although more complex to work with.
I've used the plain handle for simplicity's sake.
-- peter
Is there a trick to convert the handle back to static temp-table?
Is there a trick to convert the handle back to static temp-table?
Map an OUTPUT TABLE to an OUTPUT PARAMETER TABLE-HANDLE and vice versa.
Something like this;
EventHandler(sender, e as DerivedEventArgs):
ConvertHandle(e:TableHandle, OUTPUT TABLE myTable).
End.
Private ConvertHandle(myHandle, OUTPUT TABLE-HANDLE myTableHandle ):
myTableHandle = myHandle.
End.