Login  Register

Re: External Interfacing: Best Place for Event Handling?

Posted by Udo Schneider on Jun 01, 2006; 11:01pm
URL: https://forum.world.st/External-Interfacing-Best-Place-for-Event-Handling-tp3378819p3378821.html

Eric Taylor wrote:
> And just so I'm clear, from what I can gather from DSDN and Dolphin's
> online help, it would seem that I need to register interest in the
> events using the #when:send: family of messages.  The CreatePDF()
> function in the library takes two parameters: the handle of the window
> that will process the events, and message offset (the message offset
> provides a way to make sure that the library's message IDs are unique
> within the system).
#when:send:to: is definetly the way to go ... however somebody needs to
trigger these by calling #trigger. This is normally done withing a view.

So the view translates from Windows Message Dispatching to Dolphin's
#when:send:to: mechanism. So CreatePDF needs an hwnd of a View (whcich
can be obtained by "myView asParameter") processing these events.

You might want to take a look at WinAsyncSocket which is a non-visible
view to proccess IP Socket Events send by Windows. This should show you
how to register interest in specific events (by means of a Message Map).
Once your View gets these events it needs to dispatch them. This allows
to finally #trigger: the events in these dispatched methods which brings
us back to the beginning #when:send:to: ;-)

Does this make sense?

Regards,

Udo