Respect binded event order

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Justin
Addict
Addict
Posts: 829
Joined: Sat Apr 26, 2003 2:49 pm

Respect binded event order

Post by Justin »

When you bind the same event to several callbacks, the callbacks are called in reverse order, the last binded callback is the first being called.

This causes problems it would be more logical to respect the order the programmer choosed, like .NET does, it must be a reason.

For example if you create a custom gadget based on a canvas, the canvas code usually has to bind a lot of events like mouse click/up/down etc.. and set some properties according to that. But when you use the custom gadget and bind again some of those events to take an action the properties are still not set because the canvas bindings are not called and nothing works as expected.