I actually have read Litwin and Getz desktop developer handbook manuals cover to cover, and I can assure you my understanding of events and proper construction of events is in the same line with them.
I suppose you can assure me, but I don't see it. Specifically, I don't see it in G, L & G manuals, except in the one case that I mentioned, of a form reacting to
control events on another form.
You seem to stubborn to listen to what I am saying.
No, I'm not too stubborn to listen – I have listened, very carefully. But you keep repeating your own way of a tight coupling between sender and listener, and I keep telling you, that is not what I want, and also not what I think is the proper way to handle such things. Things do not generally work that way in the outside world, either, and I think event-driven programming is an attempt to emulate that. Your way is the equivalent of having specific responders to specific people doing specific things, rather than just the things happening. It would be like having a fire department that had to know the person setting a fire, and having a specific response team for every person that could set a fire. If a new arsonist came along, the existing fire department could not respond, because they would not be set up for that person. A new arsonist would require a new fire department, and that new department could not respond to any of the old arsonists' activities. It would be a completely ridiculous design, and I think having such a specific and limited event responder in program code is also poor design.
You seem to put words in my mouth for things I have not said.
I do not know what words you think I have put into your mouth. You have said I have an error in my code, and you have used specifically the word 'contract'. I have responded to that.
If you can find me an example of a class that traps an event without a reference to that object raising the event I will be proven wrong. But you cannot.
There are a great many event-driven languages, and I do not know anywhere near all of them, but there are constructs that do not carry information on the originator of the activity. Probably error trapping is the most obvious. When a bit of code throws an error, it does not carry information on which module or which line of code generated the error. That is an event, and you have to add special code to discover the author. Yes, I know, error trapping in VBA is confined to the module in which the error happens, but if you don't specifically trap it, the error bubbles back up through subroutine calls with no information on who caused it.
In your "centralized event raiser", no magic is happening.
Now you are putting words in my mouth. I have never made a claim of some sort of magic, only isolation of the code generating an event from the code handling the consequences. Since I cannot do it as directly as I want, this is what I came up with, and it DOES do that.
I just do not know how much real world utility there is.
Well, you have one example before you. And I do not doubt there are others. It seems painfully obvious to me that there are numerous instances where nobody cares who did something, only that it happened.
As I said, I have seen this done in M&S.
I do not know what M&S is.
You mention that this "centralized event raiser" concept you have seen as the standard way of doing event driven programming.
No, that is NOT what I wrote. In fact, I specifically wrote, just yesterday, that it was my own invention, after I couldn't get anything else to work properly. There may be a language that does what you challenge me to produce, but I do not know of one personally. However, my ignorance on a subject is not proof of its non-existence.
Can you pass any references or links? Like I said what you are constructing is a niche design, not something I ever seen described as the standard for program flow.
One reference is the one I already mentioned: Getz, Litwin and Gilbert. But since you claim that they support your view of things, when I do not see it that way, I suspect that would be the fate of anything else I dredge up, and so my effort in that direction would be a waste of time.