Open GoogleCodeExporter opened 9 years ago
In addition some modules might want to block events.
Original comment by richard.helgeby@gmail.com
on 5 Mar 2010 at 1:29
I believe we decided this wasn't possible, right?
Original comment by andrewbo...@gmail.com
on 27 Mar 2011 at 7:50
Because it use dynamic function calling it might look impossible because the
dynamic call can't see the function signature on the other side.
If we just could some how verify it _before_ calling. If the module some how
could pass it's callback function signature when registering the event manager
could compare it with a template.
Every event should then have it's own template, like this:
functag public EventFunc_PlayerDeath(victim, attacker, String:weapon[],
bool:headshot);
The tricky part is to tell the event manager (when registering a event) which
function signature the callback uses.
I'm not really sure what I'm talking about, but I think it might be possible
without being complicated either. Events, registering and callbacks should be
just as easy as before.
If it's possible to do some tricks with functag, funcenum and Function we could
at least get some type safety at compile level and avoid lots of potential
errors.
Original comment by richard.helgeby@gmail.com
on 27 Apr 2011 at 2:07
Original issue reported on code.google.com by
richard.helgeby@gmail.com
on 5 Mar 2010 at 1:03