The proper way it to chain events. Its always possible to do this, it just means unlearning a bit of ingrained procedural programming techniques and learning event driven techniques :)