Re: Some event ideas...

Bryan Bulten <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.wxnet
Message-ID <20040506165945.580a12de@goliath>
> I have added Clicked event to wx.Button. An example how to use it is
> in the changed Controls sample.
> 
> How about implementing other events this way without loosing the
> possibility to use the old way with EVT_BUTTON for example ???

This seems like an excellent way of using .NET events...

However, there is one disadvantage.  If you try adding a handler more
than once, only the last handler added gets called.  For example:

  Clicked += new EventListener(Test);
  Clicked += new EventListener(Test2);

When the event is triggered, only 'Test2' will get called.  The same
disadvantage exists with the existing event system.

Nonetheless, the solution to the mentioned problem exists deeper in the
code, and I think we can go with your method for now.


Cheers.

-- 
Bryan Bulten
http://www.bulten.ca/
http://wxnet.sourceforge.net/
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD4DBQFAmqdE32WFWIzmzHgRAi6vAJ95cyTsbTIkJSxcBdFOa+gSTWNVCgCYp2E1
Rovl5MiZkDUuN2AE9MBFBw==
=+Grd
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.