I have several windows and dialogs that I wish to convert to .net. However, some of these use the "subscribe to foo anywhere" construct. How can I get a .net form/dialog to subsribe to a PUBLISH ?
Use a procedure as an "event helper".
Class TestClass.cls would use an persistent procedure TestClass-Subscriber.p .
In the constructor,
RUN TestClass-Subscirber.p PERSISTENT SET hEventProcedure (THIS-OBJECT).
In the destructor,
DELETE PROCEDURE hEventProcedure.
The TestClass-Subscriber.p is needs an
DEFINE INPUT PARAMETER poFormInstance AS TestClass NO-UNDO.
The persistent procedure may subscribe to the events using internal procedures as event handler and will call a method in the class as the event handler.
oFormInstance:EventHandlerMethod().
Depending on the level of generalization possible, Interfaces or common base classes should be used....
Ugly, but prooven.
Aw, crap. I had to do something similar for activex and classes. I had hoped there was a cleaner way.
This is just so , so, so, pooey.
Thanks anyway.
Yeah, that worked. Grumble, Grumble.