SetEventHandler to have certain Function Event.

Feature requests for future versions of Hollywood can be voiced here
Post Reply
Bugala
Posts: 1181
Joined: Sun Feb 14, 2010 7:11 pm

SetEventHandler to have certain Function Event.

Post by Bugala »

Not sure this should be added to SetEventHandler necessarily, but maybe have something similar then.

Idea being that it would be great if I could have eventhandler in case a specific function is called, or some specific condition is met.

It would be even better if it could be triggered by any function call and then even have the information inside it of which function name was called, and by what args.

This way I could for example Debugprint every Function call and follow up what is happening in my program before it crashed. Currently I am doing this by manually adding Debugprint to start of each function, and this makes the code less readable.

If also a condition could be watched, like if X>10000, then that would mean we could practically have Observer class using this system, and that would be very useful.

But as I said, I'm not sure this should be in eventhandlers, since I guess event handlers are a bit different thing, but could you make something similar to eventhandler, which would be keeping eye on these other things.
Post Reply