I use a handful of ActiveX's but have never attempted to receive an event for any of them.
The Jade docs have pretty clear instructions on how to do this....
1. Create a Reference, type = IDispatch subclass:
app.email_events (Class:IEmail_Events)
2. Add logic to the methods (events) that display for the referenced class:
app.email_events:email_events_connected ();
write 'Here is your event';
3. Register interest in your event:
create oSmtp transient;
oSmtp.createAutomationObject();
oSmtp.beginNotifyAutomationEvent(app, 'email_events');
All seems too easy. I'm expecting an instance of the IEmail_Events IDispatch class to be created at some stage. Then when I engage the oSmtp in the correct fashion for the "connected" event to fire and see my write statement.
If I understand this correctly, the automation object will trigger an event, Jade will pick up on it and action it by sending it to the receiver (in this case app), more specifically Jade will locate the referenced object "app.email_events" and call the method "email_events_connected ()" on this object.
It's just not happening.
There is no instance of IEmail_Events instances being created at all. The app.email_event stays empty, and obviously I see no write statement.
I've played around with the parameters... oSmtp.beginNotifyAutomationEvent(app, 'email_events');... and feel confident I have these correct. It compiles and runs.
Can anyone see where I'm going wrong?