IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New dunno about C#
but the code you describe is essentially Java AWT/Swing event handling mechanism. Has been since 1.1.

\ninterface WindowListener\n{\n    public void windowClosed(WindowEvent e);\n    public void windowClosing(WindowEvent e);\n}\n
--


- I was involuntarily self-promoted into management.

[link|http://kerneltrap.org/node/4484|Richard Stallman]

New Except you have to implement the whole interface
and delegation is not always about event notification - for instance, EOModels (meta models that are used in ORMapping) have a default method of finding related model files. However, you can add a delegate to the model group that will get called whenever a search for a model file fails - thus allowing you to prompt the user for it, or implement alternate search paths.




"Whenever you find you are on the side of the majority, it is time to pause and reflect"   --Mark Twain

"The significant problems we face cannot be solved at the same level of thinking we were at when we created them."   --Albert Einstein

"This is still a dangerous world. It's a world of madmen and uncertainty and potential mental losses."   --George W. Bush
New Oh, I just gave the most pervasive example
There are others.

And BTW, windowClosing() is actually supposed to hide the window. If your idea of "close" is something else, you can use windowClosing() to change the behavior.


Also, sometimes Java library provides default implementation of the interfaces involved, which makes it easier to write your own implementation - you don't have to implement all methods.
--


- I was involuntarily self-promoted into management.

[link|http://kerneltrap.org/node/4484|Richard Stallman]

     Great - another perfectly good term hijacked and hosed - (tuberculosis) - (7)
         Not the first time - (tjsinclair)
         Hurrah! -NT - (pwhysall)
         dunno about C# - (Arkadiy) - (2)
             Except you have to implement the whole interface - (tuberculosis) - (1)
                 Oh, I just gave the most pervasive example - (Arkadiy)
         Actually, that appears to be very similar. - (altmann) - (1)
             Never mind. They are different. -NT - (altmann)

Ever since then, I can easily spot a sociopathic liar.
96 ms