On Wed, May 12, 2004 at 06:15:54PM +0200, K Stol wrote: | >It does, though, sound like we might want an alternate name for this | >stuff. While event is the right thing in some places it isn't in | >others (like the whole attribute/property mess) we may be well-served | >choosing another name. I'm open to suggestions here... | | The system sends a 'message' to the user program, telling it has | finished (for example) Disk I/O.
The aged Windows API does things as 'message queues'. Windows keeps a message queue for every running application. An application calls GetMessage to retrieve each message. As I recall, each message is a triple: a message-code, a word-parameter, and a long-parameter which is often a pointer when the simple word-parameter is not sufficient. An application then can choose to pass-up on the message, leading to a default implementation by calling DispatchMessage. It can also PostMessage to add a message to a particular application/thread's event queue. SendMessage is the blocking version of PostMessage. Anyway, if this is close to what you mean by 'event', then I'd consider calling it a 'message' and lifting as must of the Windows message-queue design pattern as seems appropriate. Clark