Avoiding global variables in event-driven programming
This is a style/design question.
I've always been told to avoid global variables, which was easy when there were no user events to interrupt flow of control(to execute a method, just 'send' it what it needs, no mess). However, in executing code that is triggered by an event, I find that the needed info has to be 'taken'. The only way I've seen to do this is to start making, what were local variables, global, so that event triggered code has access. But, as my classes get bigger, I'm running into the coupling problem of not being sure of where these variables are being changed.
Am I making any sense?
Any suggestions?

