samspade
Member
Which would you rather use and why: an object where everything is in the step event, an object where everything is in multiple events?
Example, a button object that has left pressed event, the mouse enter and leave event, the left released event or one object that does the exact same thing but all in the step event.
I've been experimenting with different versions of the same object. It seems that using multiple events plays a little nicer with inheritance as you don't have to override the whole step event to change one thing. You can also 'name' events which means if they are simple enough you can get some nice easy to read documentation. If you want something exactly in line with what they do, they are also easier to create.
But the downside for me is that once you go beyond a certain level of complexity it is just overwhelming to look at the events, open all of them, and try to make sense, especially since you can't control how they are ordered. Where as in a step event you can use regions (and/or scripts) to order code. If you want something a little different than what an event does, you could be screwed, but you have a lot more flexibility in the step event.
Example, a button object that has left pressed event, the mouse enter and leave event, the left released event or one object that does the exact same thing but all in the step event.
I've been experimenting with different versions of the same object. It seems that using multiple events plays a little nicer with inheritance as you don't have to override the whole step event to change one thing. You can also 'name' events which means if they are simple enough you can get some nice easy to read documentation. If you want something exactly in line with what they do, they are also easier to create.
But the downside for me is that once you go beyond a certain level of complexity it is just overwhelming to look at the events, open all of them, and try to make sense, especially since you can't control how they are ordered. Where as in a step event you can use regions (and/or scripts) to order code. If you want something a little different than what an event does, you could be screwed, but you have a lot more flexibility in the step event.